Commit bdea1466 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

winealsa: Do not access WAVEHDR past DriverCallback.

parent 4cff4c82
......@@ -292,15 +292,15 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
widRecorder_ReadHeaders(wwi);
/* return all buffers to the app */
for (lpWaveHdr = wwi->lpQueuePtr; lpWaveHdr; lpWaveHdr = lpWaveHdr->lpNext) {
while (wwi->lpQueuePtr) {
lpWaveHdr = wwi->lpQueuePtr;
TRACE("reset %p %p\n", lpWaveHdr, lpWaveHdr->lpNext);
wwi->lpQueuePtr = lpWaveHdr->lpNext;
lpWaveHdr->dwFlags &= ~WHDR_INQUEUE;
lpWaveHdr->dwFlags |= WHDR_DONE;
wwi->lpQueuePtr = lpWaveHdr->lpNext;
widNotifyClient(wwi, WIM_DATA, (DWORD_PTR)lpWaveHdr, 0);
}
wwi->lpQueuePtr = NULL;
SetEvent(ev);
break;
case WINE_WM_CLOSING:
......
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