From 78adb67786ab190aed24b1d78a9c493f95b10462 Mon Sep 17 00:00:00 2001 From: Robert Colton Date: Mon, 24 Jun 2019 20:54:41 -0400 Subject: [PATCH] Cached Pixmap Crash Fix (#75) Make the invalid/default/null pixmap returned by the pixmap cache static so that it is safe to return when no pixmap is found. --- Components/ArtManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Components/ArtManager.cpp b/Components/ArtManager.cpp index 90e8d934a..f93f2892e 100644 --- a/Components/ArtManager.cpp +++ b/Components/ArtManager.cpp @@ -30,7 +30,7 @@ const QIcon& ArtManager::GetIcon(const QString& name) { const QBrush& ArtManager::GetTransparenyBrush() { return transparenyBrush; } const QPixmap& ArtManager::GetCachedPixmap(const QString& name) { - QPixmap pm; + static QPixmap pm; if (!QPixmapCache::find(name, &pm)) { pm.load(name); QPixmapCache::insert(name, pm);