Skip to content

Commit

Permalink
fix crash on levelinfolayer exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Sep 19, 2023
1 parent 5ac4d3e commit 3ee1ea6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hooks/LevelInfoLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class $modify(LevelInfoLayer) {
}

void updateLabelValues() {
retain();

LevelInfoLayer::updateLabelValues();
std::thread([this](){
auto wt = ExtendedLevelInfo::workingTime(std::round(BetterInfo::timeForLevelString(m_level->m_levelString)));
Expand All @@ -52,6 +54,7 @@ class $modify(LevelInfoLayer) {
bmFont->setString(fmt::format("{}", wt).c_str());
//label->setString(fmt::format("{} ({})", label->getString(), wt).c_str());
}
release();
});
}).detach();
}
Expand Down

0 comments on commit 3ee1ea6

Please sign in to comment.