]> git.saurik.com Git - wxWidgets.git/commitdiff
don't dereference NULL parent in wxMDIChildFrame dtor if it hadn't been really created
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 18 May 2007 16:27:25 +0000 (16:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 18 May 2007 16:27:25 +0000 (16:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/mdi.cpp

index 874d23d937030967b177f2086fe715d8380c869b..7245f39a0ffc98a11c6f27d650aeea02a071cd2e 100644 (file)
@@ -778,6 +778,10 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
 
 wxMDIChildFrame::~wxMDIChildFrame()
 {
+    // if we hadn't been created, there is nothing to destroy
+    if ( !m_hWnd )
+        return;
+
     // will be destroyed by DestroyChildren() but reset them before calling it
     // to avoid using dangling pointers if a callback comes in the meanwhile
 #if wxUSE_TOOLBAR