From 3bb5c459d63d7cf9c990213e39303d9ba5eaebcc Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 1 Jul 2016 18:14:56 +0200 Subject: [PATCH] GLX: Verify all entry points during load --- src/glx_context.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/glx_context.c b/src/glx_context.c index b96baad6..a3deefcf 100644 --- a/src/glx_context.c +++ b/src/glx_context.c @@ -297,6 +297,27 @@ GLFWbool _glfwInitGLX(void) _glfw.glx.GetVisualFromFBConfig = dlsym(_glfw.glx.handle, "glXGetVisualFromFBConfig"); + if (!_glfw.glx.GetFBConfigs || + !_glfw.glx.GetFBConfigAttrib || + !_glfw.glx.GetClientString || + !_glfw.glx.QueryExtension || + !_glfw.glx.QueryVersion || + !_glfw.glx.DestroyContext || + !_glfw.glx.MakeCurrent || + !_glfw.glx.SwapBuffers || + !_glfw.glx.QueryExtensionsString || + !_glfw.glx.CreateNewContext || + !_glfw.glx.CreateWindow || + !_glfw.glx.DestroyWindow || + !_glfw.glx.GetProcAddress || + !_glfw.glx.GetProcAddressARB || + !_glfw.glx.GetVisualFromFBConfig) + { + _glfwInputError(GLFW_PLATFORM_ERROR, + "GLX: Failed to load required entry points"); + return GLFW_FALSE; + } + if (!glXQueryExtension(_glfw.x11.display, &_glfw.glx.errorBase, &_glfw.glx.eventBase))