From 303bb0a3d60c3d7b991ea7829c6dd2c5b3beb9d6 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 13 Oct 2010 14:20:38 +0100 Subject: Fix crash in QApplication auto test The pointer is lazily initialised by QWidget, but becomes invalid after the application is destroyed. In the QApplication autotest, QApplication is created and destroyed many times in the same thread (while in normal use it is created at startup and destroyed on exit) As a result, the pointer which is stored in global data became stale and caused a crash due to calling functions on a deleted object. Reviewed-By: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index ad44d21..57702c6 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1613,6 +1613,9 @@ extern void qt_cleanup_symbianFontDatabaseExtras(); // qfontdatabase_s60.cpp *****************************************************************************/ void qt_cleanup() { +#ifdef Q_WS_S60 + S60->setButtonGroupContainer(0); +#endif if(qt_S60Beep) { delete qt_S60Beep; qt_S60Beep = 0; -- cgit v0.12