diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index eec0e440b9e..7b773ef9415 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -744,6 +744,9 @@ static HRESULT WINAPI FilterGraph2_Disconnect(IFilterGraph2 *iface, IPin *ppin) TRACE("(%p/%p)->(%p)\n", This, iface, ppin); + if (!ppin) + return E_POINTER; + return IPin_Disconnect(ppin); } diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 37c1c1f2a17..e2731365172 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -1593,6 +1593,9 @@ static void test_render_filter_priority(void) hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]); ok(hr == S_OK, "IFilterGraph2_Render failed with %08x\n", hr); + hr = IFilterGraph2_Disconnect(pgraph2, NULL); + ok(hr == E_POINTER, "IFilterGraph2_Disconnect failed. Expected E_POINTER, received %08x\n", hr); + get_connected_filter_name((TestFilterImpl*)ptestfilter, ConnectedFilterName2); ok(lstrcmp(ConnectedFilterName1, ConnectedFilterName2), "expected connected filters to be different but got %s both times\n", ConnectedFilterName1);