From 00ae4b712d6bc74828806abf74315cc8dc4608b6 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Tue, 2 Sep 2014 11:41:57 +0400 Subject: [PATCH] fix work when dht is not loaded yet --- libtorrent/src/session_impl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 7c412258..99a03c26 100644 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -5823,8 +5823,12 @@ retry: entry session_impl::dht_getLocalData() const { - entry state = m_dht->state(); - return state["storage_table"]; + if( m_dht ) { + entry state = m_dht->state(); + return state["storage_table"]; + } else { + return entry(); + } } void session_impl::on_dht_router_name_lookup(error_code const& e