summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-05-30 08:43:14 -0700
committerBen Straub <bs@github.com>2013-05-30 08:43:14 -0700
commitb2984e8aac646219b06c4e0264e2d7556120b76b (patch)
treebcbe76a1ff14d04580440de168edb4ceb3c7990b /src
parent0c01f93e8c89a16b3531e4fb32384fe90bf4c548 (diff)
parentd17db2fd771ed4e0dc7dee6c043b335a89bdd545 (diff)
downloadlibgit2-b2984e8aac646219b06c4e0264e2d7556120b76b.tar.gz
Merge pull request #1622 from yorah/fix/thread-segfault
thread: fix segfault on Windows 64 bits
Diffstat (limited to 'src')
-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;
}