From f2d74d7c29888dba367b42556a9db91e5c5dbf66 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 25 Oct 2020 00:41:50 -0700 Subject: [PATCH] Don't unset the thread-local context in DllMain It's unsafe to do it at this point, since DllMain calls are in a special Windows context that can't do certain things such a call could cause. --- dsound_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dsound_main.c b/dsound_main.c index 0188fa1..28460b0 100644 --- a/dsound_main.c +++ b/dsound_main.c @@ -1398,8 +1398,6 @@ DECLSPEC_EXPORT BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID break; case DLL_THREAD_DETACH: - if(local_contexts) - set_context(NULL); break; case DLL_PROCESS_DETACH: