set m_isBeingDeleted to true (only) in SendDestroyEvent(); call it as early as possible during the window destruction to ensure that destroy event handlers can still access the full window object
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -229,7 +229,8 @@ bool wxFrame::Create( wxWindow *parent,
|
||||
|
||||
wxFrame::~wxFrame()
|
||||
{
|
||||
m_isBeingDeleted = true;
|
||||
SendDestroyEvent();
|
||||
|
||||
DeleteAllBars();
|
||||
}
|
||||
|
||||
|
@@ -660,7 +660,7 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK()
|
||||
RemoveGrab();
|
||||
}
|
||||
|
||||
m_isBeingDeleted = true;
|
||||
SendDestroyEvent();
|
||||
|
||||
// it may also be GtkScrolledWindow in the case of an MDI child
|
||||
if (GTK_IS_WINDOW(m_widget))
|
||||
|
@@ -2437,7 +2437,6 @@ void wxWindowGTK::Init()
|
||||
m_sizeSet = false;
|
||||
m_hasVMT = false;
|
||||
m_needParent = true;
|
||||
m_isBeingDeleted = false;
|
||||
|
||||
m_noExpose = false;
|
||||
m_nativeSizeEvent = false;
|
||||
@@ -2613,7 +2612,6 @@ wxWindowGTK::~wxWindowGTK()
|
||||
if ( g_delayedFocus == this )
|
||||
g_delayedFocus = NULL;
|
||||
|
||||
m_isBeingDeleted = true;
|
||||
m_hasVMT = false;
|
||||
|
||||
// destroy children before destroying this window itself
|
||||
|
Reference in New Issue
Block a user