Commit 9e143cdb authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

quartz: NotifyAllocator does not like a null argument.

parent 1f136a57
......@@ -759,6 +759,13 @@ HRESULT WINAPI MemInputPin_NotifyAllocator(IMemInputPin * iface, IMemAllocator *
if (bReadOnly)
FIXME("Read only flag not handled yet!\n");
/* FIXME: Should we release the allocator on disconnection? */
if (!pAllocator)
{
WARN("Null allocator\n");
return E_POINTER;
}
if (This->pAllocator)
IMemAllocator_Release(This->pAllocator);
This->pAllocator = pAllocator;
......@@ -1187,11 +1194,9 @@ HRESULT OutputPin_DeliverDisconnect(OutputPin * This)
}
else /* Kill the allocator! */
{
hr = IMemInputPin_NotifyAllocator(This->pMemInputPin, NULL, 0);
if (SUCCEEDED(hr))
hr = IPin_Disconnect(This->pin.pConnectedTo);
hr = IPin_Disconnect(This->pin.pConnectedTo);
}
IPin_Disconnect((IPin *)This);
}
LeaveCriticalSection(This->pin.pCritSec);
......
......@@ -96,6 +96,7 @@ static void test_pin(IPin *pin)
if (mpin)
{
ok(IMemInputPin_ReceiveCanBlock(mpin) == S_OK, "Receive can't block for pin!\n");
ok(IMemInputPin_NotifyAllocator(mpin, NULL, 0) == E_POINTER, "NotifyAllocator likes a NULL pointer argument\n");
IMemInputPin_Release(mpin);
}
/* TODO */
......
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