summaryrefslogtreecommitdiff
path: root/indra/media_plugins/winmmshim/winmm_shim.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-11-02 21:36:28 -0700
committerRichard Linden <none@none>2013-11-02 21:36:28 -0700
commit8c4825c3821c490698806f2b4771800cdb5d6956 (patch)
tree8b8eeebfc86e7b20249551ae2c90b7c60a5ac8d4 /indra/media_plugins/winmmshim/winmm_shim.cpp
parent46c3bf7575a0366c20388d19815a5ee8e01cc0c6 (diff)
initialize critical section once
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;
}