]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
fixed missing Idle events
[wxWidgets.git] / src / msw / app.cpp
index 14d9ec60869210424ac323aa6d08e328ef7ff278..072874afb789216d9d3b850d0bde5832a1e0a5b6 100644 (file)
@@ -1287,10 +1287,15 @@ int wxApp::GetComCtl32Version()
 
 void wxExit()
 {
-    wxLogError(_("Fatal error: exiting"));
-
-    wxApp::CleanUp();
-    exit(0);
+    if ( wxTheApp )
+    {
+        wxTheApp->ExitMainLoop();
+    }
+    else
+    {
+        // what else can we do?
+        exit(-1);
+    }
 }
 
 // Yield to incoming messages