X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0e278d98e9ecc0f78943a662fca855811f3bea7..71e57cd6506760f7ca0e3195a5ecf99d78a77be9:/src/msw/app.cpp?ds=inline diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 2b69e91300..d689dfa1e6 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -486,6 +486,12 @@ bool wxApp::UnregisterWindowClasses() void wxApp::CleanUp() { + // all objects pending for deletion must be deleted first, otherwise we + // would crash when they use wxWinHandleHash (and UnregisterWindowClasses() + // call wouldn't succeed as long as any windows still exist), so call the + // base class method first and only then do our clean up + wxAppBase::CleanUp(); + #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) wxSetKeyboardHook(FALSE); #endif @@ -517,8 +523,6 @@ void wxApp::CleanUp() delete wxWinHandleHash; wxWinHandleHash = NULL; - - wxAppBase::CleanUp(); } // ---------------------------------------------------------------------------- @@ -545,18 +549,6 @@ wxApp::~wxApp() delete [] argv; } -bool wxApp::Initialized() -{ -#ifndef _WINDLL - if (GetTopWindow()) - return TRUE; - else - return FALSE; -#else // Assume initialized if DLL (no way of telling) - return TRUE; -#endif -} - void wxApp::OnIdle(wxIdleEvent& event) { wxAppBase::OnIdle(event);