Skip to content

Commit

Permalink
Crashfix during clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jun 18, 2023
1 parent 2bf2f74 commit 6f9941d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Common/UI/IconCache.cpp
Expand Up @@ -102,7 +102,10 @@ bool IconCache::LoadFromFile(FILE *file) {
void IconCache::ClearTextures() {
std::unique_lock<std::mutex> lock(lock_);
for (auto &iter : cache_) {
iter.second.texture->Release();
if (iter.second.texture) {
iter.second.texture->Release();
iter.second.texture = nullptr;
}
}
}

Expand Down

0 comments on commit 6f9941d

Please sign in to comment.