don't dereference NULL parent in wxMDIChildFrame dtor if it hadn't been really created [backport from HEAD]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -778,6 +778,10 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
|
|||||||
|
|
||||||
wxMDIChildFrame::~wxMDIChildFrame()
|
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
|
// will be destroyed by DestroyChildren() but reset them before calling it
|
||||||
// to avoid using dangling pointers if a callback comes in the meanwhile
|
// to avoid using dangling pointers if a callback comes in the meanwhile
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
|
Reference in New Issue
Block a user