Commit 6ed258e2 authored by David Adam's avatar David Adam Committed by Alexandre Julliard

quartz: Check for NULL condition in FilterGraph2_Disconnect.

parent aa50cd31
...@@ -744,6 +744,9 @@ static HRESULT WINAPI FilterGraph2_Disconnect(IFilterGraph2 *iface, IPin *ppin) ...@@ -744,6 +744,9 @@ static HRESULT WINAPI FilterGraph2_Disconnect(IFilterGraph2 *iface, IPin *ppin)
TRACE("(%p/%p)->(%p)\n", This, iface, ppin); TRACE("(%p/%p)->(%p)\n", This, iface, ppin);
if (!ppin)
return E_POINTER;
return IPin_Disconnect(ppin); return IPin_Disconnect(ppin);
} }
......
...@@ -1593,6 +1593,9 @@ static void test_render_filter_priority(void) ...@@ -1593,6 +1593,9 @@ static void test_render_filter_priority(void)
hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]); hr = IFilterGraph2_Render(pgraph2, ((TestFilterImpl*)ptestfilter)->ppPins[0]);
ok(hr == S_OK, "IFilterGraph2_Render failed with %08x\n", hr); 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); get_connected_filter_name((TestFilterImpl*)ptestfilter, ConnectedFilterName2);
ok(lstrcmp(ConnectedFilterName1, ConnectedFilterName2), ok(lstrcmp(ConnectedFilterName1, ConnectedFilterName2),
"expected connected filters to be different but got %s both times\n", ConnectedFilterName1); "expected connected filters to be different but got %s both times\n", ConnectedFilterName1);
......
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