glx: Add missing null check in DRI2WireToEvent

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Juha-Pekka Heikkila
2013-12-11 02:06:00 -07:00
committed by Brian Paul
parent e84a1ab3c4
commit 84b1716b5e

View File

@@ -102,6 +102,8 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
__GLXDRIdrawable *pdraw; __GLXDRIdrawable *pdraw;
pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable); pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable);
if (pdraw == NULL)
return False;
/* Ignore swap events if we're not looking for them */ /* Ignore swap events if we're not looking for them */
aevent->type = dri2GetSwapEventType(dpy, awire->drawable); aevent->type = dri2GetSwapEventType(dpy, awire->drawable);