From 517aaf526bfbe422b49efe89b2d0d3fc49177502 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 19 Oct 2010 03:43:11 +0000 Subject: [PATCH] fixed assert when shutting down with DHT enabled --- src/session_impl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index dbb3a2616..a8b937d3f 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1072,7 +1072,11 @@ namespace aux { if (m_upnp) m_upnp->close(); if (m_natpmp) m_natpmp->close(); #ifndef TORRENT_DISABLE_DHT - if (m_dht) m_dht->stop(); + if (m_dht) + { + m_dht->stop(); + m_dht = 0; + } m_dht_announce_timer.cancel(ec); #endif m_timer.cancel(ec);