Commit 570962da authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

win32: fix vlc_threadvar_set() return (fixes #19124)

This was not noticed since none of the call sites check for error.
parent 69409cf5
......@@ -280,11 +280,12 @@ void vlc_threadvar_delete (vlc_threadvar_t *p_tls)
int vlc_threadvar_set (vlc_threadvar_t key, void *value)
int saved = GetLastError ();
int val = TlsSetValue (key->id, value) ? ENOMEM : 0;
if (val == 0)
return val;
if (!TlsSetValue(key->id, value))
return ENOMEM;
return 0;
void *vlc_threadvar_get (vlc_threadvar_t key)
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