Make all public functions do nothing on an error connection.
[free-sw/xcb/libxcb] / src / xcb_xid.c
index 1c53b53..a2e7dec 100644 (file)
@@ -36,6 +36,8 @@
 CARD32 XCBGenerateID(XCBConnection *c)
 {
     CARD32 ret;
+    if(c->has_error)
+        return -1;
     pthread_mutex_lock(&c->xid.lock);
     if(c->xid.last == c->xid.max)
     {