diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-12-15 17:39:45 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-12-19 12:48:58 +0000 |
commit | df5ad30471e2fb6c2ffc83eef2c9aafaa73958ae (patch) | |
tree | a277694145f629ef708be737802b3051a828cd16 /source | |
parent | 11c9d17c470588af980a8ed0e1f5b3496e5af8b3 (diff) | |
download | mupdf-df5ad30471e2fb6c2ffc83eef2c9aafaa73958ae.tar.xz |
mu-threads: Fix Windows mu_destroy_thread
When destroying a thread, set the thread handle to NULL so
we know that subsequent calls shouldn't try to destroy it
again.
Diffstat (limited to 'source')
-rw-r--r-- | source/helpers/mu-threads/mu-threads.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/helpers/mu-threads/mu-threads.c b/source/helpers/mu-threads/mu-threads.c index 847c3368..72fb259c 100644 --- a/source/helpers/mu-threads/mu-threads.c +++ b/source/helpers/mu-threads/mu-threads.c @@ -113,6 +113,7 @@ void mu_destroy_thread(mu_thread *th) /* We can't sensibly handle this failing */ (void)WaitForSingleObject(th->handle, INFINITE); (void)CloseHandle(th->handle); + th->handle = NULL; } int mu_create_mutex(mu_mutex *mutex) |