X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fxcb_in.c;h=973a0d2fe097da5e2cdeca301492c672d9bd7bc2;hb=29f9fe0fc805a1ec6860f167a45664cc1cf0c769;hp=cf7dbe79cc6f61839266718786b7f0b605da6a49;hpb=255c21b17f61147388bab6e1d42623a008a4a8d2;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_in.c b/src/xcb_in.c index cf7dbe7..973a0d2 100644 --- a/src/xcb_in.c +++ b/src/xcb_in.c @@ -238,6 +238,10 @@ void *XCBWaitForReply(XCBConnection *c, unsigned int request, XCBGenericError ** if(e) *e = 0; + /* If an error occurred when issuing the request, fail immediately. */ + if(!request) + return 0; + pthread_mutex_lock(&c->iolock); /* If this request has not been written yet, write it. */