Crashfix during clearing

This commit is contained in:
Henrik Rydgård committed 2023-06-18 15:14:42 +02:00
1 parent 2bf2f745e2
commit 6f9941dafa
1 file changed
+4 -1
+4 -1
View File
@@ -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;
}
}
}