Skip to content

Commit

Permalink
Fixed crash when returning to profile (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouca committed Jun 16, 2024
1 parent 4e77aeb commit 0c25541
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/MoreLeaderboards/CustomScoreCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@


class $modify(CustomScoreCell, GJScoreCell) {
GJUserScore* score_registered = nullptr;

void loadFromScore(GJUserScore* score) {
GJScoreCell::loadFromScore(score);

if (score_registered) return;
score_registered = score;

auto scene = CCDirector::sharedDirector()->getRunningScene();
auto layer = scene->getChildren()->objectAtIndex(0);
auto layerName = misc::getNodeName(layer);
Expand Down

0 comments on commit 0c25541

Please sign in to comment.