diff options
author | marha <marha@users.sourceforge.net> | 2010-06-21 13:11:01 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-21 13:11:01 +0000 |
commit | 32eb0b306052c54629bed184cf06b246bb9653cf (patch) | |
tree | 0f20e5bc987be9ee3f3f44759439f6577732cec5 | |
parent | 613f796c5d7850df96930ca94fa662191ce4d382 (diff) | |
download | vcxsrv-32eb0b306052c54629bed184cf06b246bb9653cf.tar.gz vcxsrv-32eb0b306052c54629bed184cf06b246bb9653cf.tar.bz2 vcxsrv-32eb0b306052c54629bed184cf06b246bb9653cf.zip |
Solved possible crash in _XReadEvents function
-rw-r--r-- | libX11/src/xcb_io.c | 4 |
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);
}
|