aboutsummaryrefslogtreecommitdiff
path: root/libX11
diff options
context:
space:
mode:
Diffstat (limited to 'libX11')
-rw-r--r--libX11/src/xcb_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c
index f8852f6bc..d1c5425c6 100644
--- a/libX11/src/xcb_io.c
+++ b/libX11/src/xcb_io.c
@@ -365,11 +365,11 @@ void _XReadEvents(Display *dpy)
response = poll_for_response(dpy);
if(response)
handle_response(dpy, response, False);
- else if(dpy->xcb->pending_requests->reply_waiter)
+ else if (dpy->xcb->pending_requests && dpy->xcb->pending_requests->reply_waiter)
{ /* need braces around ConditionWait */
ConditionWait(dpy, dpy->xcb->reply_notify);
}
- else
+ else if(xcb_connection_has_error(dpy->xcb->connection))
_XIOError(dpy);
}