Skip to content

Commit

Permalink
fix comment history crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Sep 12, 2023
1 parent bf60508 commit 434c941
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hooks/InfoLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ class $modify(BIInfoLayer, InfoLayer) {
bool init(GJGameLevel* level, GJUserScore* score) {
if (!InfoLayer::init(level, score)) return false;

auto cache = BetterInfoCache::sharedState();
cache->storeDatesForLevel(this->m_level);
if(level) {
auto cache = BetterInfoCache::sharedState();
cache->storeDatesForLevel(this->m_level);
}

//geode doesn't have ids defined for this so i have to resort to objectAtIndex
auto layer = static_cast<CCLayer*>(this->getChildren()->objectAtIndex(0));
Expand Down

0 comments on commit 434c941

Please sign in to comment.