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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c2f1160c23970929a2846d210357447d07ff5f0;p=mesa.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 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;