don't crash in dtor if the X11 window hadn't been created (patch 1640153)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -357,10 +357,13 @@ wxWindowX11::~wxWindowX11()
|
||||
}
|
||||
|
||||
// Destroy the window
|
||||
Window xwindow = (Window) m_mainWindow;
|
||||
wxDeleteWindowFromTable( xwindow );
|
||||
XDestroyWindow( wxGlobalDisplay(), xwindow );
|
||||
m_mainWindow = NULL;
|
||||
if ( m_mainWindow )
|
||||
{
|
||||
Window xwindow = (Window) m_mainWindow;
|
||||
wxDeleteWindowFromTable( xwindow );
|
||||
XDestroyWindow( wxGlobalDisplay(), xwindow );
|
||||
m_mainWindow = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user