glx: Add missing null check in DRI2WireToEvent
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Wed, 11 Dec 2013 09:06:00 +0000 (02:06 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 12 Dec 2013 01:18:43 +0000 (18:18 -0700)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glx/dri2.c

index bcd1f9c90117d8105fb01dcbc0751d6fa08b2de4..7e8fdeabf473368f563399429cfa7c0b68b58f1d 100644 (file)
@@ -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);