forked from Mirrors/openclonk
Delete window surfaces before breaking the connection to the X server
Otherwise, destroying the OpenGL context would crash.stable-5.1
parent
5631bb197d
commit
c40456b55e
|
@ -413,6 +413,13 @@ void C4FullScreen::Close()
|
|||
Application.Quit();
|
||||
}
|
||||
|
||||
void C4FullScreen::Clear()
|
||||
{
|
||||
if (pSurface) delete pSurface;
|
||||
pSurface = 0;
|
||||
CStdWindow::Clear();
|
||||
}
|
||||
|
||||
void C4FullScreen::Execute()
|
||||
{
|
||||
// Execute menu
|
||||
|
|
|
@ -46,6 +46,7 @@ class C4FullScreen: public CStdWindow
|
|||
bool MenuKeyControl(BYTE byCom); // direct keyboard callback
|
||||
// User requests close
|
||||
virtual void Close();
|
||||
virtual void Clear();
|
||||
virtual void CharIn(const char * c);
|
||||
#ifdef USE_X11
|
||||
virtual void HandleMessage (XEvent &e);
|
||||
|
|
|
@ -1190,6 +1190,8 @@ void C4Console::Clear()
|
|||
ClearViewportMenu();
|
||||
ClearPlayerMenu();
|
||||
ClearNetMenu();
|
||||
if(pSurface) delete pSurface;
|
||||
pSurface = 0;
|
||||
#ifndef _WIN32
|
||||
Application.Quit();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue