IRpcStubBuffer_Disconnect can be called more than once.
This commit is contained in:
parent
28479ea4aa
commit
b0b3080b2d
|
@ -100,8 +100,7 @@ ULONG WINAPI NdrCStdStubBuffer_Release(LPRPCSTUBBUFFER iface,
|
||||||
TRACE("(%p)->Release()\n",This);
|
TRACE("(%p)->Release()\n",This);
|
||||||
|
|
||||||
if (!--(This->RefCount)) {
|
if (!--(This->RefCount)) {
|
||||||
if(This->pvServerObject)
|
IRpcStubBuffer_Disconnect(iface);
|
||||||
IUnknown_Release(This->pvServerObject);
|
|
||||||
if(This->pPSFactory)
|
if(This->pPSFactory)
|
||||||
IPSFactoryBuffer_Release(This->pPSFactory);
|
IPSFactoryBuffer_Release(This->pPSFactory);
|
||||||
HeapFree(GetProcessHeap(),0,This);
|
HeapFree(GetProcessHeap(),0,This);
|
||||||
|
@ -123,8 +122,12 @@ void WINAPI CStdStubBuffer_Disconnect(LPRPCSTUBBUFFER iface)
|
||||||
{
|
{
|
||||||
CStdStubBuffer *This = (CStdStubBuffer *)iface;
|
CStdStubBuffer *This = (CStdStubBuffer *)iface;
|
||||||
TRACE("(%p)->Disconnect()\n",This);
|
TRACE("(%p)->Disconnect()\n",This);
|
||||||
|
if (This->pvServerObject)
|
||||||
|
{
|
||||||
|
IUnknown_Release(This->pvServerObject);
|
||||||
This->pvServerObject = NULL;
|
This->pvServerObject = NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface,
|
HRESULT WINAPI CStdStubBuffer_Invoke(LPRPCSTUBBUFFER iface,
|
||||||
PRPCOLEMESSAGE pMsg,
|
PRPCOLEMESSAGE pMsg,
|
||||||
|
|
Loading…
Reference in New Issue