diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpixmapcache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index de37e0ab44..d29ddcf978 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -642,7 +642,8 @@ void QPixmapCache::remove(const Key &key) void QPixmapCache::clear() { QT_TRY { - pm_cache()->clear(); + if (pm_cache.exists()) + pm_cache->clear(); } QT_CATCH(const std::bad_alloc &) { // if we ran out of memory during pm_cache(), it's no leak, // so just ignore it. |