devenum: Check for null pointer in IMoniker_BindToObject().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Zebediah Figura 2018-04-28 12:30:09 -05:00 committed by Alexandre Julliard
parent a46e47f8d0
commit 8cd4d9fb47
2 changed files with 6 additions and 0 deletions

View File

@ -444,6 +444,9 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(IMoniker *iface, IBi
TRACE("(%p)->(%p, %p, %s, %p)\n", This, pbc, pmkToLeft, debugstr_guid(riidResult), ppvResult);
if (!ppvResult)
return E_POINTER;
VariantInit(&var);
*ppvResult = NULL;

View File

@ -134,6 +134,9 @@ static void test_devenum(IBindCtx *bind_ctx)
}
}
hr = IMoniker_BindToObject(moniker, bind_ctx, NULL, &IID_IUnknown, NULL);
ok(hr == E_POINTER, "got %#x\n", hr);
IPropertyBag_Release(prop_bag);
IMoniker_Release(moniker);
}