Free should not happen when still playing.

This commit is contained in:
Robert Reif 2003-10-14 20:05:42 +00:00 committed by Alexandre Julliard
parent a3c45689b4
commit 9d2e09851b
1 changed files with 4 additions and 2 deletions

View File

@ -2357,7 +2357,8 @@ UINT WINAPI waveOutClose(HWAVEOUT hWaveOut)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
dwRet = MMDRV_Close(wmld, WODM_CLOSE); dwRet = MMDRV_Close(wmld, WODM_CLOSE);
MMDRV_Free(hWaveOut, wmld); if (dwRet != WAVERR_STILLPLAYING)
MMDRV_Free(hWaveOut, wmld);
return dwRet; return dwRet;
} }
@ -2706,7 +2707,8 @@ UINT WINAPI waveInClose(HWAVEIN hWaveIn)
return MMSYSERR_INVALHANDLE; return MMSYSERR_INVALHANDLE;
dwRet = MMDRV_Message(wmld, WIDM_CLOSE, 0L, 0L, TRUE); dwRet = MMDRV_Message(wmld, WIDM_CLOSE, 0L, 0L, TRUE);
MMDRV_Free(hWaveIn, wmld); if (dwRet != WAVERR_STILLPLAYING)
MMDRV_Free(hWaveIn, wmld);
return dwRet; return dwRet;
} }