From: Jeremy Huddleston Date: Fri, 11 May 2012 01:56:50 +0000 (-0700) Subject: darwin: Unlock our mutex before destroying it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a73a800b3200d21c32fac9f28e2f86919bc0a2ba;p=mesa.git darwin: Unlock our mutex before destroying it http://xquartz.macosforge.org/trac/ticket/575 Signed-off-by: Jeremy Huddleston --- 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));