set the containing sizer to NULL when destroying the sizer; this fixes a crash (don't ask me how could it work before)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,10 +94,16 @@ wxSizerItem::wxSizerItem( wxSizer *sizer, int proportion, int flag, int border,
|
|||||||
|
|
||||||
wxSizerItem::~wxSizerItem()
|
wxSizerItem::~wxSizerItem()
|
||||||
{
|
{
|
||||||
if (m_userData)
|
delete m_userData;
|
||||||
delete m_userData;
|
|
||||||
if (m_sizer)
|
if ( m_window )
|
||||||
|
{
|
||||||
|
m_window->SetContainingSizer(NULL);
|
||||||
|
}
|
||||||
|
else // we must be a sizer
|
||||||
|
{
|
||||||
delete m_sizer;
|
delete m_sizer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user