Commit 2736d280 authored by Alexandre Julliard's avatar Alexandre Julliard

ole32: Add a NULL pointer check in CoDisconnectObject.

parent 5de180be
......@@ -1557,6 +1557,8 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
TRACE("(%p, 0x%08x)\n", lpUnk, reserved);
if (!lpUnk) return E_INVALIDARG;
hr = IUnknown_QueryInterface(lpUnk, &IID_IMarshal, (void **)&marshal);
if (hr == S_OK)
{
......
......@@ -1331,6 +1331,9 @@ static void test_disconnect_stub(void)
CoDisconnectObject((IUnknown*)&Test_ClassFactory, 0);
ok_no_locks();
hr = CoDisconnectObject(NULL, 0);
ok( hr == E_INVALIDARG, "wrong status %x\n", hr );
}
/* tests failure case of a same-thread marshal and unmarshal twice */
......
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