Lei Zhang : winmm: Do not unload drivers when the process is terminating.
Module: wine Branch: master Commit: d20f982433b6c1fe735699f3172e67d2e0a6884b URL: http://source.winehq.org/git/wine.git/?a=commit;h=d20f982433b6c1fe735699f317... Author: Lei Zhang <thestig(a)google.com> Date: Mon Apr 28 12:28:19 2008 -0700 winmm: Do not unload drivers when the process is terminating. --- dlls/winmm/winmm.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c index a6fec99..8342c44 100644 --- a/dlls/winmm/winmm.c +++ b/dlls/winmm/winmm.c @@ -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(); - /* now unload all remaining drivers... */ - DRIVER_UnloadAll(); + /* 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;
participants (1)
-
Alexandre Julliard