summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/pthread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/win32/pthread.c b/src/win32/pthread.c
index 232709e54..2f263b3e0 100644
--- a/src/win32/pthread.c
+++ b/src/win32/pthread.c
@@ -24,8 +24,10 @@ int pthread_join(pthread_t thread, void **value_ptr)
DWORD ret = WaitForSingleObject(thread, INFINITE);
if (ret == WAIT_OBJECT_0) {
- if (value_ptr != NULL)
+ if (value_ptr != NULL) {
+ *value_ptr = NULL;
GetExitCodeThread(thread, (void *)value_ptr);
+ }
CloseHandle(thread);
return 0;
}