From 6615dc1370300188f2979fb2c6b8eaa6049d5824 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Apr 2012 16:39:44 +0200 Subject: [PATCH] gui: Clear the QPixmapCache before destroying the QPlatformIntegration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The QPixmap in the pixmap cache should not outlive the QPlatformIntegration. Clear the cache shortly before destroying the platform integration. This is fixing a crash with the DirectFB plugin in the tst_qpixmapcache test. Change-Id: I0b1a304dc37d874b412aadb77f8dbaa7d292711f Reviewed-by: Girish Ramakrishnan Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8dcd58a..0eb53df 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -68,6 +68,7 @@ #include #include #include +#include #include #include #include @@ -892,6 +893,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate() qt_cleanupFontDatabase(); + QPixmapCache::clear(); + delete platform_theme; delete platform_integration; platform_integration = 0; -- 2.7.4