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:
@@ -109,6 +109,10 @@ wxMac
|
|||||||
|
|
||||||
- Added support for the wxFRAME_FLOAT_ON_PARENT style
|
- Added support for the wxFRAME_FLOAT_ON_PARENT style
|
||||||
|
|
||||||
|
wxX11:
|
||||||
|
|
||||||
|
- Don't crash in wxWindow dtor if the window hadn't been really Create()d
|
||||||
|
|
||||||
|
|
||||||
2.8.1
|
2.8.1
|
||||||
-----
|
-----
|
||||||
|
@@ -357,10 +357,13 @@ wxWindowX11::~wxWindowX11()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the window
|
// Destroy the window
|
||||||
Window xwindow = (Window) m_mainWindow;
|
if ( m_mainWindow )
|
||||||
wxDeleteWindowFromTable( xwindow );
|
{
|
||||||
XDestroyWindow( wxGlobalDisplay(), xwindow );
|
Window xwindow = (Window) m_mainWindow;
|
||||||
m_mainWindow = NULL;
|
wxDeleteWindowFromTable( xwindow );
|
||||||
|
XDestroyWindow( wxGlobalDisplay(), xwindow );
|
||||||
|
m_mainWindow = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user