quartz: Wait for the PullPin thread to terminate.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-01-19 17:54:39 -06:00 committed by Alexandre Julliard
parent e7e576d675
commit 55b3718205
1 changed files with 5 additions and 5 deletions

View File

@ -541,11 +541,7 @@ static void PullPin_Thread_Stop(PullPin *This)
TRACE("(%p)->()\n", This);
EnterCriticalSection(This->pin.pCritSec);
{
CloseHandle(This->hThread);
This->hThread = NULL;
SetEvent(This->hEventStateChanged);
}
SetEvent(This->hEventStateChanged);
LeaveCriticalSection(This->pin.pCritSec);
IBaseFilter_Release(This->pin.pinInfo.pFilter);
@ -831,6 +827,10 @@ HRESULT WINAPI PullPin_Disconnect(IPin *iface)
}
LeaveCriticalSection(This->pin.pCritSec);
WaitForSingleObject(This->hThread, INFINITE);
CloseHandle(This->hThread);
This->hThread = NULL;
return hr;
}