]> git.cworth.org Git - glaze/blobdiff - glaze-gl.c
Fix segmentation fault if GLAZE_LIBGL is set to empty string
[glaze] / glaze-gl.c
index e7dd728c058b53f31b2ba2f0f73fdb128781512d..04f288ee97473791fdf40d3a1adfca230d75c9fc 100644 (file)
@@ -51,7 +51,7 @@ open_libgl_handle (void)
                libgl_path = getenv ("GLAZE_LIBGL_64_AUTO");
 #endif
 
-               if (libgl_path == NULL) {
+               if (libgl_path == NULL || strlen (libgl_path) == 0) {
                        fprintf (stderr,
                                 "Error: Failed to detect OpenGL library.\n"
                                 "Please set GLAZE_LIBGL to path of real libGL.so\n");