Commit d20f9824 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

winmm: Do not unload drivers when the process is terminating.

parent d2a84615
......@@ -193,8 +193,14 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
/* close all opened MCI drivers */
MCI_SendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_WAIT, 0L, TRUE);
MMDRV_Exit();
/* There's no guarantee the drivers haven't already been unloaded on
* process shutdown.
*/
if (!fImpLoad)
{
/* now unload all remaining drivers... */
DRIVER_UnloadAll();
}
WINMM_DeleteIData();
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment