Module: Mesa
Branch: 9.1
Commit: 9156b4f541a124234c97487be120c780b3c6c78e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9156b4f541a124234c97487be120c780b3c6c78e

Author: Brian Paul <[email protected]>
Date:   Mon May 20 16:13:53 2013 -0600

st/glx/xlib: check for null ctx pointer in glXIsDirect()

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64745
Note: This is a candidate for the stable branches.

Reviewed-by: Jose Fonseca <[email protected]>
(cherry picked from commit 1e9875acbe0a1204e144b12b66b5b0ec55664e2c)

---

 src/gallium/state_trackers/glx/xlib/glx_api.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c 
b/src/gallium/state_trackers/glx/xlib/glx_api.c
index 20fae26..9efcc95 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -1368,9 +1368,7 @@ glXDestroyContext( Display *dpy, GLXContext ctx )
 PUBLIC Bool
 glXIsDirect( Display *dpy, GLXContext ctx )
 {
-   GLXContext glxCtx = ctx;
-   (void) ctx;
-   return glxCtx->isDirect;
+   return ctx ? ctx->isDirect : False;
 }
 
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to