diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c index b0cdc6c3c6c..a76c7bebfb2 100644 --- a/dlls/devenum/mediacatenum.c +++ b/dlls/devenum/mediacatenum.c @@ -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; diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c index 293ba8dcc7f..383619ccfdd 100644 --- a/dlls/devenum/tests/devenum.c +++ b/dlls/devenum/tests/devenum.c @@ -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); }