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() ...@@ -83,8 +83,8 @@ OpenGLContext::~OpenGLContext()
} }
glXDestroyContext(m_aGLWin.dpy, m_aGLWin.ctx); glXDestroyContext(m_aGLWin.dpy, m_aGLWin.ctx);
if (mbPixmap) if (mbPixmap && m_aGLWin.glPix != None)
glXDestroyGLXPixmap(m_aGLWin.dpy, m_aGLWin.glPix); glXDestroyPixmap(m_aGLWin.dpy, m_aGLWin.glPix);
} }
#endif #endif
} }
...@@ -613,6 +613,12 @@ void OpenGLContext::resetToReInitialize() ...@@ -613,6 +613,12 @@ void OpenGLContext::resetToReInitialize()
if( !mbInitialized ) if( !mbInitialized )
return; return;
resetCurrent(); resetCurrent();
if (mbPixmap)
{
glXDestroyPixmap(m_aGLWin.dpy, m_aGLWin.glPix);
m_aGLWin.glPix = None;
}
mbInitialized = false; 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