From bc8f0f9d07c2e2cb889d1406069df78d6296f381 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 11 May 2007 17:23:34 +0000 Subject: [PATCH] Disable the for loop in ~wxAuiManager to avoid possibly accessing memory via bad pointers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/framemanager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index e981be60e9..c04654f4c5 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -511,12 +511,19 @@ wxAuiManager::wxAuiManager(wxWindow* managed_wnd, unsigned int flags) wxAuiManager::~wxAuiManager() { + // NOTE: It's possible that the windows have already been destroyed by the + // time this dtor is called, so this loop can result in memory access via + // invalid pointers, resulting in a crash. So it will be disabled while + // waiting for a better solution. +#if 0 for(size_t i = 0; i < m_panes.size(); i++ ) { wxAuiPaneInfo& pinfo = m_panes[i]; if( pinfo.window && !pinfo.window->GetParent() ) delete pinfo.window; } +#endif + delete m_art; }