mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 18:59:04 +02:00
Store: Fix race condition causing crashes if looking at another game before an icon finishes downloading
This commit is contained in:
1 parent
65b995ac6c
commit
2648cd0eee
4 files changed
+13
-7
No files matched your search
@@ -228,7 +228,7 @@ bool IconCache::MarkPending(const std::string &key) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void IconCache::Cancel(const std::string &key) {
|
||||
void IconCache::CancelPending(const std::string &key) {
|
||||
std::unique_lock<std::mutex> lock(lock_);
|
||||
pending_.erase(key);
|
||||
}
|
||||
@@ -266,6 +266,7 @@ Draw::Texture *IconCache::BindIconTexture(UIContext *context, const std::string
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// TODO: Cut down on how long we're holding this lock here.
|
||||
std::unique_lock<std::mutex> lock(lock_);
|
||||
auto iter = cache_.find(key);
|
||||
if (iter == cache_.end()) {
|
||||
|
||||
Reference in new issue
Block a user