qedit: Return E_POINTER from Timeline_QueryInterface if ppv is NULL.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
02f80187f0
commit
501de13b6c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue