aboutsummaryrefslogtreecommitdiff
path: root/libX11
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-21 13:11:01 +0000
committermarha <marha@users.sourceforge.net>2010-06-21 13:11:01 +0000
commit32eb0b306052c54629bed184cf06b246bb9653cf (patch)
tree0f20e5bc987be9ee3f3f44759439f6577732cec5 /libX11
parent613f796c5d7850df96930ca94fa662191ce4d382 (diff)
downloadvcxsrv-32eb0b306052c54629bed184cf06b246bb9653cf.tar.gz
vcxsrv-32eb0b306052c54629bed184cf06b246bb9653cf.tar.bz2
vcxsrv-32eb0b306052c54629bed184cf06b246bb9653cf.zip
Solved possible crash in _XReadEvents function
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);
}