From 32259b6f0b7b29ac097b061606e6ac47fcb35c03 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Tue, 1 Oct 2024 19:59:13 +0200 Subject: [PATCH] fix fruitspace gdps comments crash --- src/CommentCell.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CommentCell.cpp b/src/CommentCell.cpp index 3966884..d45716f 100644 --- a/src/CommentCell.cpp +++ b/src/CommentCell.cpp @@ -13,7 +13,10 @@ using namespace geode::node_ids; auto winSize = CCDirector::sharedDirector()->getWinSize(); bool smallCommentsMode = this->m_height == 36; //this is how robtop does the check - bool usernameNotInMenu = !m_comment->m_userScore || !m_comment->m_userScore->m_accountID || m_accountComment || m_comment->m_hasLevelID; + bool usernameNotInMenu = m_comment->m_accountID <= 0 || m_accountComment || m_comment->m_hasLevelID; + + //there is a chance m_comment->m_accountID is not set properly before loadFromComment + //but this is fixed inside loadFromComment itself, so that case is also handled if(!smallCommentsMode) getChildOfType(m_mainLayer, 0)->setID("background");