winealsa.drv: Delete the g_sessions_lock critical section when unloading the dll.

This commit is contained in:
Francois Gouget 2011-11-07 16:52:40 +01:00 committed by Alexandre Julliard
parent 5f6a8c2b60
commit 9b55cc9e6f
1 changed files with 9 additions and 2 deletions

View File

@ -219,12 +219,19 @@ static inline SessionMgr *impl_from_IAudioSessionManager2(IAudioSessionManager2
BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
{
if(reason == DLL_PROCESS_ATTACH){
switch (reason)
{
case DLL_PROCESS_ATTACH:
g_timer_q = CreateTimerQueue();
if(!g_timer_q)
return FALSE;
}
break;
case DLL_PROCESS_DETACH:
g_sessions_lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&g_sessions_lock);
break;
}
return TRUE;
}