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.
This commit is contained in:
paul4334 2016-12-06 15:19:05 -08:00 committed by Camilla Löwy
parent b0258803c6
commit 9cd378caa7

View File

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