aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_xid.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-08 11:43:52 +0000
committermarha <marha@users.sourceforge.net>2011-03-08 11:43:52 +0000
commit38759ea9d5de5d439064054afacb148707d62350 (patch)
tree9ef0e64786191cebe27788191cdc16a786faf43c /libxcb/src/xcb_xid.c
parent6cb20b12a217ef56345a79a196757fb259f5087f (diff)
downloadvcxsrv-38759ea9d5de5d439064054afacb148707d62350.tar.gz
vcxsrv-38759ea9d5de5d439064054afacb148707d62350.tar.bz2
vcxsrv-38759ea9d5de5d439064054afacb148707d62350.zip
Solved crashes when display could not be opened
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 3df5dbec6..b0de73f21 100644
--- a/libxcb/src/xcb_xid.c
+++ b/libxcb/src/xcb_xid.c
@@ -93,5 +93,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);
}