X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0e278d98e9ecc0f78943a662fca855811f3bea7..9a78988fedc6e5364368cd09e60308180d3a7425:/src/msw/app.cpp?ds=sidebyside diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 2b69e91300..a652ec54b7 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(); } // ----------------------------------------------------------------------------