From d5d5ba688f4aaa29539f73b7256742835e48d2b7 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 --- 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();