summaryrefslogtreecommitdiff
path: root/src/glx/dri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri2.c')
-rw-r--r--src/glx/dri2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glx/dri2.c b/src/glx/dri2.c
index d410898648..30999c899a 100644
--- a/src/glx/dri2.c
+++ b/src/glx/dri2.c
@@ -103,7 +103,7 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
/* 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);