aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_xid.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxcb/src/xcb_xid.c')
-rw-r--r--libxcb/src/xcb_xid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libxcb/src/xcb_xid.c b/libxcb/src/xcb_xid.c
index 79a9a27de..7d9fc621b 100644
--- a/libxcb/src/xcb_xid.c
+++ b/libxcb/src/xcb_xid.c
@@ -97,5 +97,7 @@ int _xcb_xid_init(xcb_connection_t *c)
void _xcb_xid_destroy(xcb_connection_t *c)
{
+ if (!c->xid.lock)
+ return; /* mutex was not initialised yet */
pthread_mutex_destroy(&c->xid.lock);
}