diff options
Diffstat (limited to 'src/gui/image/qpixmapcache.cpp')
-rw-r--r-- | src/gui/image/qpixmapcache.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index c9973d0..4f71e09 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -323,7 +323,12 @@ void QPixmapCache::remove(const QString &key) void QPixmapCache::clear() { - pm_cache()->clear(); + QT_TRY { + 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. + } } QT_END_NAMESPACE |