shell32: Avoid crash on NULL pointer.
This commit is contained in:
parent
9ee18919a5
commit
48155b5df0
|
@ -84,6 +84,9 @@ static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
|
|||
|
||||
TRACE("(%p,%s,%p)\n",This, debugstr_guid(riid), ppvObj);
|
||||
|
||||
if (ppvObj == NULL)
|
||||
return E_POINTER;
|
||||
|
||||
*ppvObj = NULL;
|
||||
|
||||
if (IsEqualIID(riid, &IID_IUnknown) ||
|
||||
|
|
|
@ -54,6 +54,9 @@ static void test_IQueryAssociations_QueryInterface(void)
|
|||
IUnknown_Release(unk);
|
||||
}
|
||||
|
||||
hr = IUnknown_QueryInterface(qa, &IID_IUnknown, NULL);
|
||||
ok(hr == E_POINTER, "got 0x%x (expected E_POINTER)\n", hr);
|
||||
|
||||
IQueryAssociations_Release(qa);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue