quartz: Don't call ReleaseSemaphore on NULL semaphore handles.
This commit is contained in:
parent
f9527e9ce8
commit
9d41c2e694
|
@ -394,7 +394,7 @@ static HRESULT WINAPI BaseMemAllocator_ReleaseBuffer(IMemAllocator * iface, IMed
|
|||
LeaveCriticalSection(&This->csState);
|
||||
|
||||
/* notify a waiting thread that there is now a free buffer */
|
||||
if (!ReleaseSemaphore(This->hSemWaiting, 1, NULL))
|
||||
if (This->hSemWaiting && !ReleaseSemaphore(This->hSemWaiting, 1, NULL))
|
||||
{
|
||||
ERR("ReleaseSemaphore failed with error %u\n", GetLastError());
|
||||
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||
|
|
Loading…
Reference in New Issue