Commit b2984e8a by Ben Straub

Merge pull request #1622 from yorah/fix/thread-segfault

thread: fix segfault on Windows 64 bits
parents 0c01f93e d17db2fd
...@@ -24,8 +24,10 @@ int pthread_join(pthread_t thread, void **value_ptr) ...@@ -24,8 +24,10 @@ int pthread_join(pthread_t thread, void **value_ptr)
DWORD ret = WaitForSingleObject(thread, INFINITE); DWORD ret = WaitForSingleObject(thread, INFINITE);
if (ret == WAIT_OBJECT_0) { if (ret == WAIT_OBJECT_0) {
if (value_ptr != NULL) if (value_ptr != NULL) {
*value_ptr = NULL;
GetExitCodeThread(thread, (void *)value_ptr); GetExitCodeThread(thread, (void *)value_ptr);
}
CloseHandle(thread); CloseHandle(thread);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment