mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
rpcrt4: Only attempt to marshal an object if it is non-NULL.
This commit is contained in:
parent
48ca838873
commit
4197140738
@ -257,9 +257,13 @@ unsigned char * WINAPI NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
|
|||||||
if (pStubMsg->Buffer + sizeof(DWORD) < (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) {
|
if (pStubMsg->Buffer + sizeof(DWORD) < (unsigned char *)pStubMsg->RpcMsg->Buffer + pStubMsg->BufferLength) {
|
||||||
stream = RpcStream_Create(pStubMsg, TRUE);
|
stream = RpcStream_Create(pStubMsg, TRUE);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
|
if (pMemory)
|
||||||
hr = COM_MarshalInterface(stream, riid, (LPUNKNOWN)pMemory,
|
hr = COM_MarshalInterface(stream, riid, (LPUNKNOWN)pMemory,
|
||||||
pStubMsg->dwDestContext, pStubMsg->pvDestContext,
|
pStubMsg->dwDestContext, pStubMsg->pvDestContext,
|
||||||
MSHLFLAGS_NORMAL);
|
MSHLFLAGS_NORMAL);
|
||||||
|
else
|
||||||
|
hr = S_OK;
|
||||||
|
|
||||||
IStream_Release(stream);
|
IStream_Release(stream);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
RpcRaiseException(hr);
|
RpcRaiseException(hr);
|
||||||
|
Loading…
Reference in New Issue
Block a user