From 087e61dbcadc8c545bc3035b0e0840fa0a3b870a Mon Sep 17 00:00:00 2001 From: cpubug Date: Wed, 23 Apr 2014 22:47:17 +0400 Subject: [PATCH] fix crash --- Streaming.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Streaming.cpp b/Streaming.cpp index 9a23c313..b338c8c6 100644 --- a/Streaming.cpp +++ b/Streaming.cpp @@ -283,11 +283,11 @@ namespace stream bool Stream::SendPacket (const uint8_t * buf, size_t len) { const I2NPMessage * leaseSet = nullptr; - if (m_LeaseSetUpdated) - { - leaseSet = m_LocalDestination->GetLeaseSet (); - m_LeaseSetUpdated = false; - } + + leaseSet = m_LocalDestination->GetLeaseSet (); + if (!leaseSet) + return false; + I2NPMessage * msg = i2p::garlic::routing.WrapMessage (m_RemoteLeaseSet, CreateDataMessage (this, buf, len), leaseSet); if (!m_OutboundTunnel || m_OutboundTunnel->IsFailed ())