source/Platform/Unix/X11Display.cpp: in destroy() make sure m_disp is valid before calling functions that needs it.
This commit is contained in:
parent
0d029817fe
commit
50439a58bd
1 changed files with 6 additions and 5 deletions
|
|
@ -78,12 +78,13 @@ bool X11Display::create(DisplayDescription description)
|
|||
|
||||
void X11Display::destroy()
|
||||
{
|
||||
if (m_win) {
|
||||
X11WindowEventHandler::unregisterHandler(m_disp, m_win);
|
||||
::XDestroyWindow(m_disp, m_win);
|
||||
}
|
||||
|
||||
if (m_disp) {
|
||||
|
||||
if (m_win) {
|
||||
X11WindowEventHandler::unregisterHandler(m_disp, m_win);
|
||||
::XDestroyWindow(m_disp, m_win);
|
||||
}
|
||||
|
||||
XReleaseDisplay(m_disp);
|
||||
m_disp = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue