aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_ext.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxcb/src/xcb_ext.c')
-rw-r--r--libxcb/src/xcb_ext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libxcb/src/xcb_ext.c b/libxcb/src/xcb_ext.c
index edad18da3..be7862f41 100644
--- a/libxcb/src/xcb_ext.c
+++ b/libxcb/src/xcb_ext.c
@@ -119,6 +119,8 @@ int _xcb_ext_init(xcb_connection_t *c)
void _xcb_ext_destroy(xcb_connection_t *c)
{
+ if (!c->ext.lock)
+ return; /* mutex is not initialised */
pthread_mutex_destroy(&c->ext.lock);
while(c->ext.extensions_size-- > 0)
if(c->ext.extensions[c->ext.extensions_size].tag == LAZY_FORCED)