quartz: Don't call ReleaseSemaphore on NULL semaphore handles.

This commit is contained in:
Chris Robinson 2007-04-04 05:07:31 -07:00 committed by Alexandre Julliard
parent f9527e9ce8
commit 9d41c2e694
1 changed files with 1 additions and 1 deletions

View File

@ -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());