From: Juha-Pekka Heikkila Date: Wed, 11 Dec 2013 09:06:00 +0000 (-0700) Subject: glx: Add missing null check in DRI2WireToEvent X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84b1716b5efa98c21db32ff7f55bb7608d6a11df;p=mesa.git glx: Add missing null check in DRI2WireToEvent Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Brian Paul --- diff --git a/src/glx/dri2.c b/src/glx/dri2.c index bcd1f9c9011..7e8fdeabf47 100644 --- a/src/glx/dri2.c +++ b/src/glx/dri2.c @@ -102,6 +102,8 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire) __GLXDRIdrawable *pdraw; pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable); + if (pdraw == NULL) + return False; /* Ignore swap events if we're not looking for them */ aevent->type = dri2GetSwapEventType(dpy, awire->drawable);