winecoreaudio: Make wodReset fail if called on a closed device.

This commit is contained in:
Ken Thomases 2007-06-20 07:01:11 -05:00 committed by Alexandre Julliard
parent ed10114b12
commit 4906ffaa5b

View File

@ -1278,7 +1278,14 @@ static DWORD wodReset(WORD wDevID)
wwo = &WOutDev[wDevID];
OSSpinLockLock(&wwo->lock);
if (wwo->state == WINE_WS_CLOSED)
{
OSSpinLockUnlock(&wwo->lock);
WARN("resetting a closed device\n");
return MMSYSERR_INVALHANDLE;
}
lpSavedQueuePtr = wwo->lpQueuePtr;
wwo->lpPlayPtr = wwo->lpQueuePtr = wwo->lpLoopPtr = NULL;
wwo->state = WINE_WS_STOPPED;