Skip to content

Commit

Permalink
GLX: Verify all entry points during load
Browse files Browse the repository at this point in the history
  • Loading branch information
elmindreda committed Jul 1, 2016
1 parent 145ea03 commit 3bb5c45
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/glx_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 3bb5c45

Please sign in to comment.