shell32: Avoid crash on NULL pointer.

This commit is contained in:
Detlef Riekenberg 2012-01-16 00:06:14 +01:00 committed by Alexandre Julliard
parent 9ee18919a5
commit 48155b5df0
2 changed files with 6 additions and 0 deletions

View File

@ -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) ||

View File

@ -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);
}