From 214f7d56bc178415f538eaf8c393bcbf3223ce62 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 4 Dec 2007 19:04:26 -0800 Subject: [PATCH] winmm: do not unload drivers when the process is terminating --- dlls/winmm/tests/driver.c | 6 ------ dlls/winmm/winmm.c | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/winmm/tests/driver.c b/dlls/winmm/tests/driver.c index 4450013..a6bd3af 100644 --- a/dlls/winmm/tests/driver.c +++ b/dlls/winmm/tests/driver.c @@ -127,12 +127,6 @@ static void driver_unload_test(void) goto driver_unload_test_exit1; } - if (!strcmp(winetest_platform, "wine")) - { - skip("Skipping test on Wine (leads to a crash)\n"); - goto driver_unload_test_exit1; - } - hr = AVIMakeCompressedStream(&psc, ps, &aco, NULL); ok(hr == AVIERR_OK, "AVIERR_OK returned %d\n", hr); diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c index 1f3602c..477e5bb 100644 --- a/dlls/winmm/winmm.c +++ b/dlls/winmm/winmm.c @@ -194,7 +194,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, MCI_SendCommand(MCI_ALL_DEVICE_ID, MCI_CLOSE, MCI_WAIT, 0L, TRUE); MMDRV_Exit(); /* now unload all remaining drivers... */ - DRIVER_UnloadAll(); + if (!fImpLoad) + DRIVER_UnloadAll(); WINMM_DeleteIData(); break; -- 1.4.1