From f4a95131c59225d846244099b8aeca7bddd8ee83 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 10 Jun 2016 00:55:17 -0400 Subject: [PATCH] improve asserts in dht_storage --- simulation/libsimulator | 2 +- src/kademlia/dht_storage.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/simulation/libsimulator b/simulation/libsimulator index f0e42435d..ea3bffe3c 160000 --- a/simulation/libsimulator +++ b/simulation/libsimulator @@ -1 +1 @@ -Subproject commit f0e42435dce3ff227cc81b17ccab143b21d8f771 +Subproject commit ea3bffe3c53bca5e0976914ea951193ba43fbed6 diff --git a/src/kademlia/dht_storage.cpp b/src/kademlia/dht_storage.cpp index 1d223f12a..989462347 100644 --- a/src/kademlia/dht_storage.cpp +++ b/src/kademlia/dht_storage.cpp @@ -362,6 +362,7 @@ namespace , char const* buf, int size , address const& addr) override { + TORRENT_ASSERT(!m_node_ids.empty()); dht_immutable_table_t::iterator i = m_immutable_table.find(target); if (i == m_immutable_table.end()) { @@ -427,6 +428,7 @@ namespace , char const* salt, int salt_size , address const& addr) override { + TORRENT_ASSERT(!m_node_ids.empty()); dht_mutable_table_t::iterator i = m_mutable_table.find(target); if (i == m_mutable_table.end()) {