Kaydet (Commit) 92e9753b authored tarafından Markus Mohrhard's avatar Markus Mohrhard

fix glx resource leak

Change-Id: I013676d2f4caa0479c917a7f833966be8f0b8009
üst 74249cb6
......@@ -83,8 +83,8 @@ OpenGLContext::~OpenGLContext()
}
glXDestroyContext(m_aGLWin.dpy, m_aGLWin.ctx);
if (mbPixmap)
glXDestroyGLXPixmap(m_aGLWin.dpy, m_aGLWin.glPix);
if (mbPixmap && m_aGLWin.glPix != None)
glXDestroyPixmap(m_aGLWin.dpy, m_aGLWin.glPix);
}
#endif
}
......@@ -613,6 +613,12 @@ void OpenGLContext::resetToReInitialize()
if( !mbInitialized )
return;
resetCurrent();
if (mbPixmap)
{
glXDestroyPixmap(m_aGLWin.dpy, m_aGLWin.glPix);
m_aGLWin.glPix = None;
}
mbInitialized = false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment