winecoreaudio: Make wodReset fail if called on a closed device.
This commit is contained in:
parent
ed10114b12
commit
4906ffaa5b
|
@ -1279,6 +1279,13 @@ static DWORD wodReset(WORD wDevID)
|
||||||
|
|
||||||
OSSpinLockLock(&wwo->lock);
|
OSSpinLockLock(&wwo->lock);
|
||||||
|
|
||||||
|
if (wwo->state == WINE_WS_CLOSED)
|
||||||
|
{
|
||||||
|
OSSpinLockUnlock(&wwo->lock);
|
||||||
|
WARN("resetting a closed device\n");
|
||||||
|
return MMSYSERR_INVALHANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
lpSavedQueuePtr = wwo->lpQueuePtr;
|
lpSavedQueuePtr = wwo->lpQueuePtr;
|
||||||
wwo->lpPlayPtr = wwo->lpQueuePtr = wwo->lpLoopPtr = NULL;
|
wwo->lpPlayPtr = wwo->lpQueuePtr = wwo->lpLoopPtr = NULL;
|
||||||
wwo->state = WINE_WS_STOPPED;
|
wwo->state = WINE_WS_STOPPED;
|
||||||
|
|
Loading…
Reference in New Issue