]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't delete dangling pointers in destructor (ported from 2.8)
authorJulian Smart <julian@anthemion.co.uk>
Fri, 9 Nov 2007 11:01:53 +0000 (11:01 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 9 Nov 2007 11:01:53 +0000 (11:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/framemanager.cpp

index 6e38dd291de94f5530b3c75349c34b3d738d0b84..cca1063c40be20c39ee285af5a638cc81084e8e9 100644 (file)
@@ -586,12 +586,18 @@ 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;
 }