summaryrefslogtreecommitdiff
path: root/GL
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2006-03-24 17:58:39 +0000
committerKristian Høgsberg <krh@redhat.com>2006-03-24 17:58:39 +0000
commitd1746ec0f0c8a0b750f390e7a7faf21b67683f4a (patch)
treef5b719a69282bc25f0aacd338737feeba2e50d6b /GL
parentf1616508c95d12dfaad2cfd61b40228b3dba6f60 (diff)
Make sure DRI module is loaded before calling DRI functions.
Diffstat (limited to 'GL')
-rw-r--r--GL/glx/glxdri.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c
index 9e5c6b019..385a8fab8 100644
--- a/GL/glx/glxdri.c
+++ b/GL/glx/glxdri.c
@@ -724,6 +724,11 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
char filename[128];
Bool isCapable;
+ if (dlsym (NULL, "DRIQueryDirectRenderingCapable") == NULL) {
+ LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n");
+ return NULL;
+ }
+
if (!DRIQueryDirectRenderingCapable(pScreen, &isCapable) || !isCapable) {
LogMessage(X_ERROR,
"AIGLX: Screen %d is not DRI capable\n", pScreen->myNum);