diff --git a/dlls/dxdiagn/container.c b/dlls/dxdiagn/container.c index 621579bcac6..e02d1d13cf3 100644 --- a/dlls/dxdiagn/container.c +++ b/dlls/dxdiagn/container.c @@ -33,6 +33,8 @@ HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFII { IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; + if (!ppobj) return E_INVALIDARG; + if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDxDiagContainer)) { IUnknown_AddRef(iface); @@ -41,6 +43,7 @@ HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFII } WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + *ppobj = NULL; return E_NOINTERFACE; } diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c index 88d67b60268..21bb32ddf6b 100644 --- a/dlls/dxdiagn/provider.c +++ b/dlls/dxdiagn/provider.c @@ -48,6 +48,8 @@ static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, { IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; + if (!ppobj) return E_INVALIDARG; + if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDxDiagProvider)) { IUnknown_AddRef(iface); @@ -56,6 +58,7 @@ static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, } WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + *ppobj = NULL; return E_NOINTERFACE; }