summaryrefslogtreecommitdiffstats
path: root/src/glx/apple/apple_glx_drawable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/apple/apple_glx_drawable.c')
-rw-r--r--src/glx/apple/apple_glx_drawable.c3
1 files changed, 3 insertions, 0 deletions
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));