diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-06-29 07:43:21 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-29 07:43:21 +0200 |
commit | 9836c7e10440364f3516c9a29e351cba92237b61 (patch) | |
tree | bb1f0a0b546d801efe9bebde50adee039b7b3388 /netwerk/sctp/datachannel/DataChannel.cpp | |
parent | 5dd272f43b8714b6816bb7a31c8f642d8d78315a (diff) | |
download | UXP-9836c7e10440364f3516c9a29e351cba92237b61.tar UXP-9836c7e10440364f3516c9a29e351cba92237b61.tar.gz UXP-9836c7e10440364f3516c9a29e351cba92237b61.tar.lz UXP-9836c7e10440364f3516c9a29e351cba92237b61.tar.xz UXP-9836c7e10440364f3516c9a29e351cba92237b61.zip |
WebRTC: Nullcheck DataChannel SendPacket calls.
Diffstat (limited to 'netwerk/sctp/datachannel/DataChannel.cpp')
-rw-r--r-- | netwerk/sctp/datachannel/DataChannel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/netwerk/sctp/datachannel/DataChannel.cpp b/netwerk/sctp/datachannel/DataChannel.cpp index d47a9d5ea..f2a91c589 100644 --- a/netwerk/sctp/datachannel/DataChannel.cpp +++ b/netwerk/sctp/datachannel/DataChannel.cpp @@ -654,7 +654,10 @@ int DataChannelConnection::SendPacket(unsigned char data[], size_t len, bool release) { //LOG(("%p: SCTP/DTLS sent %ld bytes", this, len)); - int res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0; + int res = 0; + if (mTransportFlow) { + res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0; + } if (release) delete [] data; return res; |