From 8c4825c3821c490698806f2b4771800cdb5d6956 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sat, 2 Nov 2013 21:36:28 -0700 Subject: initialize critical section once --- indra/media_plugins/winmmshim/winmm_shim.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/media_plugins/winmmshim') 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; } -- cgit v1.2.3