From df5ad30471e2fb6c2ffc83eef2c9aafaa73958ae Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 15 Dec 2016 17:39:45 +0000 Subject: 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. --- source/helpers/mu-threads/mu-threads.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/helpers') 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) -- cgit v1.2.3