Fix crasher bug when attempting to show the active window before it is created 061812165722 061812165933
authorRusty Lynch <rusty.lynch@intel.com>
Mon, 18 Jun 2012 23:52:13 +0000 (16:52 -0700)
committerRusty Lynch <rusty.lynch@intel.com>
Mon, 18 Jun 2012 23:52:13 +0000 (16:52 -0700)
src/qmlmainwindow.cpp

index 72d3963..c3096dc 100644 (file)
@@ -136,9 +136,12 @@ void QMLMainWindow::tryToShow()
     if (d->component->isReady())
         {
             DialerApplication *da = DialerApplication::instance();
-           da->activeWindow();
-            da->activeWindow()->show();
-            da->activeWindow()->activateWindow();
+            QWidget *w = da->activeWindow();
+            if (w) 
+                {
+                    da->activeWindow()->show();
+                    da->activeWindow()->activateWindow();
+                }
             this->show();
         }