crash when deleting window in OnUnsplit() corrected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -893,8 +893,7 @@ void wxSplitterWindow::OnDoubleClick(wxSplitterEvent& event)
|
|||||||
// for compatibility, call the virtual function
|
// for compatibility, call the virtual function
|
||||||
OnDoubleClickSash(event.GetX(), event.GetY());
|
OnDoubleClickSash(event.GetX(), event.GetY());
|
||||||
|
|
||||||
if ( GetMinimumPaneSize() == 0
|
if ( GetMinimumPaneSize() == 0 || m_permitUnsplitAlways )
|
||||||
|| m_permitUnsplitAlways)
|
|
||||||
{
|
{
|
||||||
Unsplit();
|
Unsplit();
|
||||||
}
|
}
|
||||||
@@ -904,8 +903,9 @@ void wxSplitterWindow::OnUnsplitEvent(wxSplitterEvent& event)
|
|||||||
{
|
{
|
||||||
wxWindow *win = event.GetWindowBeingRemoved();
|
wxWindow *win = event.GetWindowBeingRemoved();
|
||||||
|
|
||||||
|
// do it before calling OnUnsplit() which may delete the window
|
||||||
|
win->Show(FALSE);
|
||||||
|
|
||||||
// for compatibility, call the virtual function
|
// for compatibility, call the virtual function
|
||||||
OnUnsplit(win);
|
OnUnsplit(win);
|
||||||
|
|
||||||
win->Show(FALSE);
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user