Make sure DRI module is loaded before calling DRI functions.

This commit is contained in:
Kristian Høgsberg 2006-03-24 17:58:39 +00:00
parent f1616508c9
commit d1746ec0f0
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-03-24 Kristian Høgsberg <krh@redhat.com>
* GL/glx/glxdri.c (__glXDRIscreenProbe): Make sure DRI module is
loaded before calling DRI functions.
2006-03-23 Alan Coopersmith <alan.coopersmith@sun.com>
* hw/xfree86/getconfig/getconfig.pl:

View File

@ -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);