From c70aa5143b83d01aafadc602bb8aff942b0ad3f9 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 6 Dec 2016 20:24:21 +0100 Subject: [PATCH] Changed: Don't close a display already closed --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 7 +++++-- 1 file changed, 5 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 9514d938f..171214384 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -501,8 +501,11 @@ bool CDriverGL::unInit() // restore default X errors handler XSetErrorHandler(NULL); - XCloseDisplay(_dpy); - _dpy = NULL; + if (_dpy) + { + XCloseDisplay(_dpy); + _dpy = NULL; + } #endif // NL_OS_UNIX