Return an error in CoMarshalInterface if the IUnknown pointer is NULL

and don't crash.
This commit is contained in:
Aric Stewart 2004-06-30 18:14:00 +00:00 committed by Alexandre Julliard
parent 1b2a819075
commit 665c4880f7
1 changed files with 4 additions and 0 deletions

View File

@ -453,6 +453,10 @@ CoMarshalInterface( IStream *pStm, REFIID riid, IUnknown *pUnk,
TRACE("(%p, %s, %p, %lx, %p, %lx)\n",
pStm,debugstr_guid(riid),pUnk,dwDestContext,pvDestContext,mshlflags
);
if (pUnk == NULL)
return E_INVALIDARG;
STUBMGR_Start(); /* Just to be sure we have one running. */
mid.processid = GetCurrentProcessId();
IUnknown_QueryInterface(pUnk,&IID_IUnknown,(LPVOID*)&pUnknown);