Workaround for a shutdown destruction order problem.

Part of #21055
This commit is contained in:
Henrik Rydgård committed 2026-01-02 14:36:16 +01:00
1 parent 64461329e7
commit 1d16d6be6a
1 file changed
+8
+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();
}