summaryrefslogtreecommitdiff
path: root/source/helpers/mu-threads/mu-threads.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-12-15 17:39:45 +0000
committerRobin Watts <robin.watts@artifex.com>2016-12-19 12:48:58 +0000
commitdf5ad30471e2fb6c2ffc83eef2c9aafaa73958ae (patch)
treea277694145f629ef708be737802b3051a828cd16 /source/helpers/mu-threads/mu-threads.c
parent11c9d17c470588af980a8ed0e1f5b3496e5af8b3 (diff)
downloadmupdf-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/helpers/mu-threads/mu-threads.c')
-rw-r--r--source/helpers/mu-threads/mu-threads.c1
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)