From a73a800b3200d21c32fac9f28e2f86919bc0a2ba Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 10 May 2012 18:56:50 -0700 Subject: darwin: Unlock our mutex before destroying it http://xquartz.macosforge.org/trac/ticket/575 Signed-off-by: Jeremy Huddleston --- src/glx/apple/apple_glx_drawable.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/glx/apple') diff --git a/src/glx/apple/apple_glx_drawable.c b/src/glx/apple/apple_glx_drawable.c index 3f84d560c53..b261a554b11 100644 --- a/src/glx/apple/apple_glx_drawable.c +++ b/src/glx/apple/apple_glx_drawable.c @@ -174,6 +174,9 @@ destroy_drawable(struct apple_glx_drawable *d) apple_glx_diagnostic("%s: freeing %p\n", __func__, (void *) d); + /* Stupid recursive locks */ + while (pthread_mutex_unlock(&d->mutex) == 0); + err = pthread_mutex_destroy(&d->mutex); if (err) { fprintf(stderr, "pthread_mutex_destroy error: %s\n", strerror(err)); -- cgit v1.2.3