From 7c2f1160c23970929a2846d210357447d07ff5f0 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 6 Dec 2011 17:15:26 -0800 Subject: [PATCH] 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 --- src/glx/glxcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2