summaryrefslogtreecommitdiffstats
path: root/netwerk/sctp/datachannel
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/sctp/datachannel')
-rw-r--r--netwerk/sctp/datachannel/DataChannel.cpp5
-rw-r--r--netwerk/sctp/datachannel/DataChannel.h2
2 files changed, 5 insertions, 2 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;
diff --git a/netwerk/sctp/datachannel/DataChannel.h b/netwerk/sctp/datachannel/DataChannel.h
index 84ab422fc..ebf29366b 100644
--- a/netwerk/sctp/datachannel/DataChannel.h
+++ b/netwerk/sctp/datachannel/DataChannel.h
@@ -111,7 +111,7 @@ public:
virtual void NotifyDataChannel(already_AddRefed<DataChannel> channel) = 0;
};
- explicit DataChannelConnection(DataConnectionListener *listener);
+ DataChannelConnection(DataConnectionListener *listener);
bool Init(unsigned short aPort, uint16_t aNumStreams, bool aUsingDtls);
void Destroy(); // So we can spawn refs tied to runnables in shutdown