Skip to content

Commit

Permalink
Don't unset the thread-local context in DllMain
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kcat committed Oct 25, 2020
1 parent b0bea6e commit f2d74d7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions dsound_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f2d74d7

Please sign in to comment.