summaryrefslogtreecommitdiff
path: root/src/dispatch_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispatch_glx.c')
-rw-r--r--src/dispatch_glx.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dispatch_glx.c b/src/dispatch_glx.c
index b5ad42e..e395564 100644
--- a/src/dispatch_glx.c
+++ b/src/dispatch_glx.c
@@ -158,12 +158,14 @@ epoxy_has_glx(Display *dpy)
#if !PLATFORM_HAS_GLX
return false;
#else
- Bool (* pf_glXQueryExtension) (Display *, int *, int *);
- int error_base, event_base;
-
- pf_glXQueryExtension = epoxy_conservative_glx_dlsym("glXQueryExtension", false);
- if (pf_glXQueryExtension && pf_glXQueryExtension(dpy, &error_base, &event_base))
- return true;
+ if (epoxy_load_glx(false, true)) {
+ Bool (* pf_glXQueryExtension) (Display *, int *, int *);
+ int error_base, event_base;
+
+ pf_glXQueryExtension = epoxy_conservative_glx_dlsym("glXQueryExtension", false);
+ if (pf_glXQueryExtension && pf_glXQueryExtension(dpy, &error_base, &event_base))
+ return true;
+ }
return false;
#endif /* !PLATFORM_HAS_GLX */