Fix invalid EGL display being terminated

This commit is contained in:
Camilla Berglund 2016-03-29 11:09:03 +02:00
parent 20574fa81f
commit c234a19423

View File

@ -269,9 +269,14 @@ GLFWbool _glfwInitEGL(void)
//
void _glfwTerminateEGL(void)
{
if (_glfw.egl.handle)
if (_glfw.egl.display)
{
eglTerminate(_glfw.egl.display);
_glfw.egl.display = EGL_NO_DISPLAY;
}
if (_glfw.egl.handle)
{
_glfw_dlclose(_glfw.egl.handle);
_glfw.egl.handle = NULL;
}