summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2.c
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <[email protected]>2013-12-11 02:06:00 -0700
committerBrian Paul <[email protected]>2013-12-11 18:18:43 -0700
commit84b1716b5efa98c21db32ff7f55bb7608d6a11df (patch)
tree0b942d2876c6bc4df3a0948d0a68c81b3148e619 /src/glx/dri2.c
parente84a1ab3c400f819408a7ebe01c2325cd59d94d3 (diff)
glx: Add missing null check in DRI2WireToEvent
Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/glx/dri2.c')
-rw-r--r--src/glx/dri2.c2
1 files changed, 2 insertions, 0 deletions
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);