diff options
author | Jeremy Huddleston <[email protected]> | 2012-05-10 18:56:50 -0700 |
---|---|---|
committer | Jeremy Huddleston <[email protected]> | 2012-05-16 18:58:29 -0700 |
commit | a73a800b3200d21c32fac9f28e2f86919bc0a2ba (patch) | |
tree | 8bdaa6777dacb2f848d99973f52dc032e962aac8 /src | |
parent | 7446a0407d4e61a826385c11ed6c401837baf095 (diff) |
darwin: Unlock our mutex before destroying it
http://xquartz.macosforge.org/trac/ticket/575
Signed-off-by: Jeremy Huddleston <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glx/apple/apple_glx_drawable.c | 3 |
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)); |