From 25869b4e9db9a77f6b5e6e57a43af826b533a372 Mon Sep 17 00:00:00 2001 From: Christoph Feck Date: Sat, 30 Jul 2011 21:18:38 +0200 Subject: [PATCH] Fix accessing pixmapCache after it is deleted BUG: 275570 FIXED-IN: 4.7.1 (cherry picked from commit f5b095fdaaae164ef04dd46dfb4fb97a8aa87768) --- theme.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/theme.cpp b/theme.cpp index b66768062..2c427990f 100644 --- a/theme.cpp +++ b/theme.cpp @@ -310,10 +310,12 @@ void ThemePrivate::discardCache(CacheTypes caches) void ThemePrivate::scheduledCacheUpdate() { - QHashIterator it(pixmapsToCache); - while (it.hasNext()) { - it.next(); - pixmapCache->insertPixmap(idsToCache[it.key()], it.value()); + if (useCache()) { + QHashIterator it(pixmapsToCache); + while (it.hasNext()) { + it.next(); + pixmapCache->insertPixmap(idsToCache[it.key()], it.value()); + } } pixmapsToCache.clear();