Fixed crash caused by trying to cast and dereference a NULL hChannel.
This commit is contained in:
parent
95a72a182c
commit
7d5963a1e6
@ -123,13 +123,16 @@ static int freerdp_peer_virtual_channel_write(freerdp_peer* client, HANDLE hChan
|
||||
UINT32 chunkSize;
|
||||
UINT32 maxChunkSize;
|
||||
UINT32 totalLength;
|
||||
rdpPeerChannel* peerChannel;
|
||||
rdpMcsChannel* mcsChannel;
|
||||
rdpRdp* rdp = client->context->rdp;
|
||||
rdpPeerChannel* peerChannel = (rdpPeerChannel*) hChannel;
|
||||
rdpMcsChannel* mcsChannel = peerChannel->mcsChannel;
|
||||
|
||||
if (!hChannel)
|
||||
return -1;
|
||||
|
||||
peerChannel = (rdpPeerChannel*) hChannel;
|
||||
mcsChannel = peerChannel->mcsChannel;
|
||||
|
||||
if (peerChannel->channelFlags & WTS_CHANNEL_OPTION_DYNAMIC)
|
||||
return -1; /* not yet supported */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user