mirror of
https://github.com/AxioDL/boo.git
synced 2025-06-01 04:01:36 +00:00
Destructor order fix
This commit is contained in:
parent
d145e15ecb
commit
ae790866e5
@ -270,18 +270,32 @@ public:
|
||||
visualIdOut = m_visualid;
|
||||
}
|
||||
|
||||
~GraphicsContextGLX()
|
||||
void destroy()
|
||||
{
|
||||
if (m_glxCtx)
|
||||
{
|
||||
glXDestroyContext(m_xDisp, m_glxCtx);
|
||||
m_glxCtx = nullptr;
|
||||
}
|
||||
if (m_glxWindow)
|
||||
{
|
||||
glXDestroyWindow(m_xDisp, m_glxWindow);
|
||||
m_glxWindow = 0;
|
||||
}
|
||||
if (m_loadCtx)
|
||||
{
|
||||
glXDestroyContext(m_xDisp, m_loadCtx);
|
||||
m_vsyncRunning = false;
|
||||
m_vsyncThread.join();
|
||||
m_loadCtx = nullptr;
|
||||
}
|
||||
if (m_vsyncRunning)
|
||||
{
|
||||
m_vsyncRunning = false;
|
||||
m_vsyncThread.join();
|
||||
}
|
||||
}
|
||||
|
||||
~GraphicsContextGLX() {destroy();}
|
||||
|
||||
void _setCallback(IWindowCallback* cb)
|
||||
{
|
||||
m_callback = cb;
|
||||
@ -574,6 +588,7 @@ public:
|
||||
~WindowXlib()
|
||||
{
|
||||
XLockDisplay(m_xDisp);
|
||||
m_gfxCtx.destroy();
|
||||
XUnmapWindow(m_xDisp, m_windowId);
|
||||
XDestroyWindow(m_xDisp, m_windowId);
|
||||
XFreeColormap(m_xDisp, m_colormapId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user