From: Vadim Zeitlin Date: Tue, 25 Mar 2003 01:51:11 +0000 (+0000) Subject: call wxApp::OnExit() when wxExit() is called and don't do wxLogError from it (replace... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9b4e3f352b36dee39d7e451a6c9db90862f5563e call wxApp::OnExit() when wxExit() is called and don't do wxLogError from it (replaces patch 709142) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 14d9ec6086..072874afb7 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -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