From df16a53ef9ae506c51023178e4fe45ce45e69447 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 16 Dec 2001 20:37:49 +0000 Subject: [PATCH] another segfault fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mgl/app.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/mgl/app.cpp b/src/mgl/app.cpp index 9112462198..d40b8d7062 100644 --- a/src/mgl/app.cpp +++ b/src/mgl/app.cpp @@ -461,13 +461,10 @@ void wxApp::CleanUp() wxDeleteStockObjects(); wxDeleteStockLists(); - // Can't do this in wxModule, because fonts are needed by stock lists - delete wxTheFontsManager; - wxTheFontsManager = (wxFontsManager*) NULL; - delete wxTheApp; wxTheApp = (wxApp*) NULL; + // GL: I'm annoyed ... I don't know where to put this and I don't want to // create a module for that as it's part of the core. #if wxUSE_THREADS @@ -477,10 +474,16 @@ void wxApp::CleanUp() wxSystemSettings::Done(); - delete[] wxBuffer; - wxClassInfo::CleanUpClasses(); + // Can't do this in wxModule, because fonts are needed by stock lists + // (do it after deleting wxTheApp and cleaning modules up, since somebody + // may be deleting fonts that lately) + delete wxTheFontsManager; + wxTheFontsManager = (wxFontsManager*) NULL; + + delete[] wxBuffer; + // check for memory leaks #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT if (wxDebugContext::CountObjectsLeft(TRUE) > 0) -- 2.50.0