Fixed a crash on nvidia when recreating egl context

This commit is contained in:
Deve 2019-03-14 22:56:38 +01:00
parent 4e7526a712
commit 7b58c439fc

View File

@ -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();
} }