diff --git a/src/policy.cpp b/src/policy.cpp index 5c69ea3bd..dff860bd2 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -1470,6 +1470,7 @@ namespace libtorrent { policy::peer* p = static_cast(*i); if (p == 0) continue; + if (p->connection == 0) continue; TORRENT_ASSERT(std::find_if(m_peers.begin(), m_peers.end() , match_peer_connection(*p->connection)) != m_peers.end()); }