remove us from the parents children list in Destroy()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8e35ab96f6
commit
cafcf62a83
@ -80,6 +80,19 @@ bool wxTopLevelWindowBase::Destroy()
|
||||
if ( !wxPendingDelete.Member(this) )
|
||||
wxPendingDelete.Append(this);
|
||||
|
||||
// but hide it immediately
|
||||
Hide();
|
||||
|
||||
// also remove it from the list of parents children so that the loop in
|
||||
// wxWindowBase::DestroyChildren() eventually terminates
|
||||
if ( m_parent )
|
||||
{
|
||||
m_parent->RemoveChild(this);
|
||||
|
||||
// don't do it again in our dtor
|
||||
m_parent = NULL;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user