Skip to content

Commit

Permalink
fix possible extendedlevelinfo crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Sep 19, 2023
1 parent 8c17390 commit f0a5193
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/layers/ExtendedLevelInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ void ExtendedLevelInfo::refreshInfoTexts() {

void ExtendedLevelInfo::setupAdditionalInfo() {
m_uploadDateEstimated = BetterInfoCache::sharedState()->getUploadDate(m_level->m_levelID, this);
retain();

std::thread([this]() {
std::string levelString(BetterInfo::decodeBase64Gzip(m_level->m_levelString));
Expand All @@ -240,6 +241,7 @@ void ExtendedLevelInfo::setupAdditionalInfo() {
refreshInfoTexts();
Loader::get()->queueInMainThread([this]() {
this->loadPage(this->m_page);
release();
});
}).detach();
}
Expand Down

0 comments on commit f0a5193

Please sign in to comment.