From: Ian Romanick Date: Wed, 7 Dec 2011 01:15:26 +0000 (-0800) Subject: glx: Don't segfault if xcb_glx_is_direct_reply returns NULL X-Git-Tag: mesa-8.0-rc1~529 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c2f1160c23970929a2846d210357447d07ff5f0;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt --- diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index c8ec9c2..c29bc1c 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;