Crashfix during clearing

This commit is contained in:
Henrik Rydgård 2023-06-18 15:12:58 +02:00
parent 2bf2f745e2
commit 6f9941dafa

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;
}
}
}