Avoid crashing when releasing an NdrCStdStubBuffer that had been

previously disconnected.
This commit is contained in:
Alberto Massari 2002-11-08 18:52:34 +00:00 committed by Alexandre Julliard
parent 768d98e7e9
commit d9159093a5
1 changed files with 4 additions and 2 deletions

View File

@ -95,8 +95,10 @@ ULONG WINAPI NdrCStdStubBuffer_Release(LPRPCSTUBBUFFER iface,
TRACE("(%p)->Release()\n",This);
if (!--(This->RefCount)) {
IUnknown_Release(This->pvServerObject);
IPSFactoryBuffer_Release(This->pPSFactory);
if(This->pvServerObject)
IUnknown_Release(This->pvServerObject);
if(This->pPSFactory)
IPSFactoryBuffer_Release(This->pPSFactory);
HeapFree(GetProcessHeap(),0,This);
return 0;
}