quartz: Make sure pin state cannot change while a flush is in progress.

This commit is contained in:
Erich Hoover 2011-05-14 11:15:06 -06:00 committed by Alexandre Julliard
parent 484c952cf2
commit 493a3a0f9d
1 changed files with 5 additions and 0 deletions

View File

@ -387,6 +387,9 @@ static void PullPin_Flush(PullPin *This)
if (This->pReader)
{
/* Do not allow state to change while flushing */
EnterCriticalSection(This->pin.pCritSec);
/* Flush outstanding samples */
IAsyncReader_BeginFlush(This->pReader);
@ -405,6 +408,8 @@ static void PullPin_Flush(PullPin *This)
}
IAsyncReader_EndFlush(This->pReader);
LeaveCriticalSection(This->pin.pCritSec);
}
}