summaryrefslogtreecommitdiff
path: root/node/Topology.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Topology.hpp')
-rw-r--r--node/Topology.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/node/Topology.hpp b/node/Topology.hpp
index d6f453ac..99933866 100644
--- a/node/Topology.hpp
+++ b/node/Topology.hpp
@@ -234,8 +234,15 @@ public:
Hashtable< Address,SharedPtr<Peer> >::Iterator i(_peers);
Address *a = (Address *)0;
SharedPtr<Peer> *p = (SharedPtr<Peer> *)0;
- while (i.next(a,p))
- f(*this,*p);
+ while (i.next(a,p)) {
+#ifdef ZT_TRACE
+ if (!(*p)) {
+ ZT_TRACE("eachPeer() caught NULL peer for %s",a->toString().c_str());
+ abort();
+ }
+#endif
+ f(*this,*((const SharedPtr<Peer> *)p));
+ }
}
/**