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); TRACE("(%p)->Release()\n",This);
if (!--(This->RefCount)) { if (!--(This->RefCount)) {
IUnknown_Release(This->pvServerObject); if(This->pvServerObject)
IPSFactoryBuffer_Release(This->pPSFactory); IUnknown_Release(This->pvServerObject);
if(This->pPSFactory)
IPSFactoryBuffer_Release(This->pPSFactory);
HeapFree(GetProcessHeap(),0,This); HeapFree(GetProcessHeap(),0,This);
return 0; return 0;
} }