Lei Zhang : winmm: Do not unload drivers when the process is terminating.
Alexandre Julliard
julliard at winehq.org
Tue Apr 29 08:54:47 CDT 2008
Module: wine
Branch: master
Commit: d20f982433b6c1fe735699f3172e67d2e0a6884b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d20f982433b6c1fe735699f3172e67d2e0a6884b
Author: Lei Zhang <thestig at 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;
More information about the wine-cvs
mailing list