Commit 48155b5d authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

shell32: Avoid crash on NULL pointer.

parent 9ee18919
...@@ -84,6 +84,9 @@ static HRESULT WINAPI IQueryAssociations_fnQueryInterface( ...@@ -84,6 +84,9 @@ static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
TRACE("(%p,%s,%p)\n",This, debugstr_guid(riid), ppvObj); TRACE("(%p,%s,%p)\n",This, debugstr_guid(riid), ppvObj);
if (ppvObj == NULL)
return E_POINTER;
*ppvObj = NULL; *ppvObj = NULL;
if (IsEqualIID(riid, &IID_IUnknown) || if (IsEqualIID(riid, &IID_IUnknown) ||
......
...@@ -54,6 +54,9 @@ static void test_IQueryAssociations_QueryInterface(void) ...@@ -54,6 +54,9 @@ static void test_IQueryAssociations_QueryInterface(void)
IUnknown_Release(unk); 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); IQueryAssociations_Release(qa);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment