]> git.saurik.com Git - wxWidgets.git/commitdiff
call wxApp::OnExit() when wxExit() is called and don't do wxLogError from it (replace...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 25 Mar 2003 01:51:11 +0000 (01:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 25 Mar 2003 01:51:11 +0000 (01:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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