浏览代码

GLX: Check whether client string is NULL

In very rare cases the X server reports the GLX extension as present but
functions return invalid fallback values.

Closes #912.
paul4334 8 年之前
父节点
当前提交
9cd378caa7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/glx_context.c

+ 1 - 1
src/glx_context.c

@@ -59,7 +59,7 @@ static GLFWbool chooseGLXFBConfig(const _GLFWfbconfig* desired, GLXFBConfig* res
     // HACK: This is a (hopefully temporary) workaround for Chromium
     //       (VirtualBox GL) not setting the window bit on any GLXFBConfigs
     vendor = glXGetClientString(_glfw.x11.display, GLX_VENDOR);
-    if (strcmp(vendor, "Chromium") == 0)
+    if (vendor && strcmp(vendor, "Chromium") == 0)
         trustWindowBit = GLFW_FALSE;
 
     nativeConfigs =