Commit a596cbb8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dmime: Fix handling of NULL out pointer in QI.

parent 51a4fce5
......@@ -37,6 +37,9 @@ static HRESULT WINAPI DirectMusicSegmentState8_QueryInterface(IDirectMusicSegmen
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
if (!ppobj)
return E_POINTER;
*ppobj = NULL;
if (IsEqualIID(riid, &IID_IUnknown) ||
......
......@@ -293,6 +293,9 @@ static void test_COM_segmentstate(void)
ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
refcount = IUnknown_Release(unk);
hr = IDirectMusicSegmentState8_QueryInterface(dmss8, &IID_IUnknown, NULL);
ok(hr == E_POINTER, "got %08x\n", hr);
while (IDirectMusicSegmentState8_Release(dmss8));
}
......
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