From f0a5193aafde7fe4148aa8a5ad36a4215f2d6f74 Mon Sep 17 00:00:00 2001 From: Cvolton Date: Tue, 19 Sep 2023 18:04:00 +0200 Subject: [PATCH] fix possible extendedlevelinfo crash --- src/layers/ExtendedLevelInfo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/layers/ExtendedLevelInfo.cpp b/src/layers/ExtendedLevelInfo.cpp index 09b9be9..f66ee38 100644 --- a/src/layers/ExtendedLevelInfo.cpp +++ b/src/layers/ExtendedLevelInfo.cpp @@ -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)); @@ -240,6 +241,7 @@ void ExtendedLevelInfo::setupAdditionalInfo() { refreshInfoTexts(); Loader::get()->queueInMainThread([this]() { this->loadPage(this->m_page); + release(); }); }).detach(); }