From d7afbdc2d2b6a7eaa02651887b9dc3408f6d4539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 5 Dec 2012 09:42:16 +0100 Subject: Fixed crash in tst_qguiapplication with QT_QPA_PLATFORM=minimal The tst_qguiapplication creates and destroys multiple instances of QGuiApplication. Since the minimal platform plugin doesn't report any theme names, the platform_theme never gets set to 0 in init_platform, and we end up trying to use or at least delete an already deleted QPlatformTheme. Change-Id: I1a41d55b0705c5531c019e60a7a96dac144bacb7 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qguiapplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index fb14490a24..7abda84bfa 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1065,7 +1065,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate() QPixmapCache::clear(); - delete platform_theme; + delete platform_theme; + platform_theme = 0; delete platform_integration; platform_integration = 0; delete m_gammaTables.load(); -- cgit v1.2.3