Since we now actually destroy GLX drawables, we get into situations where
we get events for drawables that no longer exist. Just ignore the
event in that case.
/* Ignore swap events if we're not looking for them */
pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable);
- if (!(pdraw->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK))
+ if (!pdraw || !(pdraw->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK))
return False;
aevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *) wire);