From 3f529a6e7068b610b7ab4456eddc835449dc894c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Wed, 10 Mar 2010 20:52:46 +0100 Subject: [PATCH] mcicda: Prevent crash when closing while playing. --- dlls/mcicda/mcicda.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mcicda/mcicda.c b/dlls/mcicda/mcicda.c index 92c943584e4..5c995344c32 100644 --- a/dlls/mcicda/mcicda.c +++ b/dlls/mcicda/mcicda.c @@ -483,6 +483,8 @@ static DWORD MCICDA_Close(UINT wDevID, DWORD dwParam, LPMCI_GENERIC_PARMS lpParm if (wmcda == NULL) return MCIERR_INVALID_DEVICE_ID; + MCICDA_Stop(wDevID, MCI_WAIT, NULL); + if (--wmcda->nUseCount == 0) { CloseHandle(wmcda->handle); }