David Adam : quartz: Check for NULL condition in FilterGraph2_Disconnect.
Alexandre Julliard
julliard at winehq.org
Wed Nov 12 07:18:44 CST 2008
Module: wine
Branch: master
Commit: 6ed258e220b29a1c14dcaebebd6123889c308019
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6ed258e220b29a1c14dcaebebd6123889c308019
Author: David Adam <david.adam.cnrs at gmail.com>
Date: Wed Nov 12 07:55:38 2008 +0100
quartz: Check for NULL condition in FilterGraph2_Disconnect.
---
dlls/quartz/filtergraph.c | 3 +++
dlls/quartz/tests/filtergraph.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index eec0e44..7b773ef 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 37c1c1f..e273136 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);
More information about the wine-cvs
mailing list