Commit 245bbda7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

win32: fix vlc_thread_self() in cancellation handlers

parent 8efa6ab4
......@@ -619,11 +619,12 @@ void vlc_testcancel (void)
return;
#endif
th->killable = true; /* Do not re-enter cancellation cleanup */
for (vlc_cleanup_t *p = th->cleaners; p != NULL; p = p->next)
p->proc (p->data);
th->data = NULL; /* TODO: special value? */
TlsSetValue(thread_key, NULL);
if (th->id == NULL) /* Detached thread */
free(th);
_endthreadex(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