Make sure setActive(false) is called before the surface is destroyed in EglContext. Fixes #1530.

This commit is contained in:
binary1248 2018-12-29 13:36:01 +01:00
parent b9fdaf487f
commit db80f6a60f
No known key found for this signature in database
GPG Key ID: E5E52A5D6082224A

View File

@ -233,11 +233,11 @@ void EglContext::createSurface(EGLNativeWindowType window)
////////////////////////////////////////////////////////////
void EglContext::destroySurface()
{
// Ensure that this context is no longer active since our surface is going to be destroyed
setActive(false);
eglCheck(eglDestroySurface(m_display, m_surface));
m_surface = EGL_NO_SURFACE;
// Ensure that this context is no longer active since our surface is now destroyed
setActive(false);
}