Fixed a crash on nvidia when recreating egl context
This commit is contained in:
parent
4e7526a712
commit
7b58c439fc
@ -507,8 +507,11 @@ bool ContextManagerEGL::createContext()
|
|||||||
|
|
||||||
void ContextManagerEGL::close()
|
void ContextManagerEGL::close()
|
||||||
{
|
{
|
||||||
eglMakeCurrent(m_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
|
if (m_egl_display != EGL_NO_DISPLAY)
|
||||||
EGL_NO_CONTEXT);
|
{
|
||||||
|
eglMakeCurrent(m_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
|
||||||
|
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