summaryrefslogtreecommitdiff
path: root/indra/media_plugins/winmmshim/winmm_shim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/media_plugins/winmmshim/winmm_shim.cpp')
-rwxr-xr-xindra/media_plugins/winmmshim/winmm_shim.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/media_plugins/winmmshim/winmm_shim.cpp b/indra/media_plugins/winmmshim/winmm_shim.cpp
index aac349bf57..6297189869 100755
--- a/indra/media_plugins/winmmshim/winmm_shim.cpp
+++ b/indra/media_plugins/winmmshim/winmm_shim.cpp
@@ -39,7 +39,10 @@ BOOL APIENTRY DllMain( HMODULE hModule,
LPVOID lpReserved
)
{
- InitializeCriticalSection(&sCriticalSection);
+ if (ul_reason_for_call == DLL_PROCESS_ATTACH)
+ {
+ InitializeCriticalSection(&sCriticalSection);
+ }
return TRUE;
}