From 91e833cdaf4fd41e2c4ffe2e098b0fb5f2a47364 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 19 Dec 2014 12:07:54 -0500 Subject: [PATCH] fixed crash at shutdown --- Destination.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Destination.cpp b/Destination.cpp index 29af4ebc..d12a7843 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -51,11 +51,16 @@ namespace client ClientDestination::~ClientDestination () { - Stop (); + if (m_IsRunning) + Stop (); for (auto it: m_RemoteLeaseSets) delete it.second; if (m_Pool) i2p::tunnel::tunnels.DeleteTunnelPool (m_Pool); + if (m_StreamingDestination) + delete m_StreamingDestination; + if (m_DatagramDestination) + delete m_DatagramDestination; } void ClientDestination::Run ()