ole32: Add a NULL pointer check in CoDisconnectObject.
This commit is contained in:
parent
5de180beeb
commit
2736d28064
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue