summaryrefslogtreecommitdiff
path: root/src/xcb_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xcb_out.c')
-rw-r--r--src/xcb_out.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xcb_out.c b/src/xcb_out.c
index 56e02f7..91f7ea1 100644
--- a/src/xcb_out.c
+++ b/src/xcb_out.c
@@ -59,6 +59,8 @@ static int write_block(XCBConnection *c, struct iovec *vector, int count)
CARD32 XCBGetMaximumRequestLength(XCBConnection *c)
{
+ if(c->has_error)
+ return 0;
pthread_mutex_lock(&c->out.reqlenlock);
if(!c->out.maximum_request_length)
{
@@ -91,6 +93,9 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c
int veclen = req->count;
enum workarounds workaround = WORKAROUND_NONE;
+ if(c->has_error)
+ return 0;
+
assert(c != 0);
assert(vector != 0);
assert(req->count > 0);
@@ -200,6 +205,8 @@ unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, c
int XCBFlush(XCBConnection *c)
{
int ret;
+ if(c->has_error)
+ return 0;
pthread_mutex_lock(&c->iolock);
ret = _xcb_out_flush_to(c, c->out.request);
pthread_mutex_unlock(&c->iolock);