From f312f32d624c6198c63890e141e8658bc492cf37 Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 06 Mar 2005 23:30:41 +0000 Subject: The mainwidget could be deleted before the qpeapplication will be destructed or the event loop will be left. Use a QGuardedPtr to not save widget coordinates on a not anymore existing mainwidget --- (limited to 'library') diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 2bd7cbe..953f9d0 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -167,7 +167,7 @@ public: QCString message; QByteArray data; }; - QWidget* qpe_main_widget; + QGuardedPtr qpe_main_widget; QGuardedPtr lastraised; QQueue qcopq; QString styleName; @@ -319,6 +319,9 @@ public: static void store_widget_rect(QWidget *w, QString &app) { + if( !w ) + return; + // 350 is the trigger in qwsdefaultdecoration for providing a resize button if ( qApp->desktop()->width() <= 350 ) return; -- cgit v0.9.0.2