diff options
author | Kristian Høgsberg <[email protected]> | 2008-03-10 17:59:46 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-03-10 18:46:19 -0400 |
commit | 3731159ec6e1527655d91b3eb364d5c2d252ac60 (patch) | |
tree | 22fceea9f8e55b73a10243b79b9e38487261d05d /src/glx/x11/glxcmds.c | |
parent | 7c7fece97734284858a4605b8e2ca3e4eb0851ee (diff) |
Only try to call DRI function if DRI got initialized properly.
Diffstat (limited to 'src/glx/x11/glxcmds.c')
-rw-r--r-- | src/glx/x11/glxcmds.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index c761ddf29ff..1437ea54425 100644 --- a/src/glx/x11/glxcmds.c +++ b/src/glx/x11/glxcmds.c @@ -360,6 +360,10 @@ CreateContext(Display *dpy, XVisualInfo *vis, Bool use_glx_1_3, int renderType) { GLXContext gc; +#ifdef GLX_DIRECT_RENDERING + int screen = (fbconfig == NULL) ? vis->screen : fbconfig->screen; + __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); +#endif if ( dpy == NULL ) return NULL; @@ -373,9 +377,7 @@ CreateContext(Display *dpy, XVisualInfo *vis, return NULL; #ifdef GLX_DIRECT_RENDERING - if (allowDirect) { - int screen = (fbconfig == NULL) ? vis->screen : fbconfig->screen; - __GLXscreenConfigs * const psc = GetGLXScreenConfigs(dpy, screen); + if (allowDirect && psc->driScreen) { const __GLcontextModes * mode; if (fbconfig == NULL) { |