Workaround for a shutdown destruction order problem.

Part of #21055
This commit is contained in:
Henrik Rydgård
2026-01-02 14:17:56 +01:00
parent 64461329e7
commit 1d16d6be6a
+8
View File
@@ -935,6 +935,14 @@ void GameInfoCache::Clear() {
CancelAll();
std::lock_guard<std::mutex> lock(mapLock_);
// NOTE: Some shared_pointers might have other owners. We still need to wipe their textures here.
for (auto &[key, value] : info_) {
std::lock_guard<std::mutex> lock(value->lock);
value->pic0.Clear();
value->pic1.Clear();
value->icon.Clear();
value->hasFlags &= ~(GameInfoFlags::PIC0 | GameInfoFlags::PIC1 | GameInfoFlags::ICON);
}
info_.clear();
}