GLX: Fix segfault when no GLXFBConfigs available

Fixes #1040.
This commit is contained in:
Camilla Löwy
2017-07-07 10:23:58 +02:00
parent 8c0512027f
commit 07bf2b166b
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ static GLFWbool chooseGLXFBConfig(const _GLFWfbconfig* desired, GLXFBConfig* res
nativeConfigs =
glXGetFBConfigs(_glfw.x11.display, _glfw.x11.screen, &nativeCount);
if (!nativeCount)
if (!nativeConfigs || !nativeCount)
{
_glfwInputError(GLFW_API_UNAVAILABLE, "GLX: No GLXFBConfigs returned");
return GLFW_FALSE;