Commit 501de13b authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

qedit: Return E_POINTER from Timeline_QueryInterface if ppv is NULL.

parent 02f80187
......@@ -29,7 +29,7 @@ static void test_timeline(void)
HRESULT hr;
IAMTimeline *timeline = NULL;
IAMTimeline *timeline2 = (IAMTimeline *)0xdeadbeef;
IAMTimelineObj *obj;
IAMTimelineObj *obj = (IAMTimelineObj *)0xdeadbeef;
IAMTimelineObj obj_iface;
TIMELINE_MAJOR_TYPE type;
......@@ -37,6 +37,13 @@ static void test_timeline(void)
ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08x\n", hr);
if (!timeline) return;
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, NULL);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, (void **)&obj);
ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr);
ok(!obj, "Expected NULL got %p\n", obj);
hr = IAMTimeline_CreateEmptyNode(timeline, NULL, 0);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
......
......@@ -70,6 +70,9 @@ static HRESULT WINAPI Timeline_QueryInterface(IUnknown *iface, REFIID riid, void
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
if (!ppv)
return E_POINTER;
*ppv = NULL;
if (IsEqualIID(riid, &IID_IUnknown))
*ppv = &This->IUnknown_inner;
......
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