Fixed a crash on nvidia when recreating egl context
This commit is contained in:
parent
4e7526a712
commit
7b58c439fc
@ -506,9 +506,12 @@ bool ContextManagerEGL::createContext()
|
|||||||
|
|
||||||
|
|
||||||
void ContextManagerEGL::close()
|
void ContextManagerEGL::close()
|
||||||
|
{
|
||||||
|
if (m_egl_display != EGL_NO_DISPLAY)
|
||||||
{
|
{
|
||||||
eglMakeCurrent(m_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
|
eglMakeCurrent(m_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
|
||||||
EGL_NO_CONTEXT);
|
EGL_NO_CONTEXT);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_egl_context != EGL_NO_CONTEXT)
|
if (m_egl_context != EGL_NO_CONTEXT)
|
||||||
{
|
{
|
||||||
@ -527,6 +530,8 @@ void ContextManagerEGL::close()
|
|||||||
eglTerminate(m_egl_display);
|
eglTerminate(m_egl_display);
|
||||||
m_egl_display = EGL_NO_DISPLAY;
|
m_egl_display = EGL_NO_DISPLAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eglReleaseThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user