summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-12-06 17:15:26 -0800
committerIan Romanick <[email protected]>2011-12-19 14:55:30 -0800
commit7c2f1160c23970929a2846d210357447d07ff5f0 (patch)
tree5f855b519cd48397d12ea8aa99d51dba367ef54a /src/glx
parentc4a8c54c3bb31547cba57702ffea99293afef522 (diff)
glx: Don't segfault if xcb_glx_is_direct_reply returns NULL
NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/glxcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index c8ec9c21fed..c29bc1cb67b 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -594,7 +594,7 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
(c, contextID),
NULL);
- const Bool is_direct = reply->is_direct ? True : False;
+ const Bool is_direct = (reply != NULL && reply->is_direct) ? True : False;
free(reply);
return is_direct;