From 21ada78b63903c2584942ab20cd9e2a1076f34be Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 25 Dec 2015 15:30:14 +0100 Subject: [PATCH] Changed: Display a warning when calling getModes if Display is NULL --HG-- branch : develop --- code/nel/src/3d/driver/opengl/driver_opengl_window.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 36ac67281..3c60da0c0 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -2058,6 +2058,12 @@ bool CDriverGL::getModes(std::vector &modes) #elif defined (NL_OS_UNIX) + if (!_dpy) + { + nlwarning("3D: Unable to list modes because Display is NULL, did you forget to call init() ?"); + return false; + } + bool found = false; int screen = DefaultScreen(_dpy);