Commit 4906ffaa authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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

parent ed10114b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment