diff options
Diffstat (limited to 'osdep/win32')
-rw-r--r-- | osdep/win32/pthread.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/osdep/win32/pthread.c b/osdep/win32/pthread.c index d4a5ddc22a..141ecfc5e0 100644 --- a/osdep/win32/pthread.c +++ b/osdep/win32/pthread.c @@ -206,11 +206,12 @@ int pthread_detach(pthread_t thread) static DWORD WINAPI run_thread(LPVOID lpParameter) { pthread_mutex_lock(&pthread_table_lock); - struct m_thread_info *info = find_thread_info(pthread_self()); - assert(info); + struct m_thread_info *pinfo = find_thread_info(pthread_self()); + assert(pinfo); + struct m_thread_info info = *pinfo; pthread_mutex_unlock(&pthread_table_lock); - pthread_exit(info->user_fn(info->user_arg)); + pthread_exit(info.user_fn(info.user_arg)); abort(); // not reached } |