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