[Mesa-dev] [PATCH 2/2] xlib: check for null ctx pointer in glXIsDirect()

Brian Paul brianp at vmware.com
Mon May 20 15:20:14 PDT 2013


Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64745
Note: This is a candidate for the stable branches.
---
 src/mesa/drivers/x11/fakeglx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index daed4f4..c7fb327 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1551,7 +1551,7 @@ Fake_glXIsDirect( Display *dpy, GLXContext ctx )
 {
    struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx;
    (void) dpy;
-   return glxCtx->xmesaContext->direct;
+   return glxCtx ? glxCtx->xmesaContext->direct : False;
 }
 
 
-- 
1.7.3.4



More information about the mesa-dev mailing list