From f888774e122259f85c6fa468f7899347c70e6a52 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 18 Feb 2016 11:56:44 +0100 Subject: [PATCH] Fix gl context not being deleted with custom window --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index d2abbfd38..3595a31ba 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1629,7 +1629,7 @@ bool CDriverGL::destroyWindow() if (_hDC) wglMakeCurrent(_hDC, NULL); - if (_DestroyWindow && _hRC) + if (_hRC) { wglDeleteContext(_hRC); _hRC = NULL; @@ -1644,7 +1644,7 @@ bool CDriverGL::destroyWindow() #elif defined(NL_OS_MAC) #elif defined(NL_OS_UNIX) - if (_DestroyWindow && _ctx) + if (_DestroyWindow && _ctx) // FIXME: _DestroyWindow may need to be removed here as well glXDestroyContext(_dpy, _ctx); _ctx = NULL;