policy invariant check fix

This commit is contained in:
Arvid Norberg 2007-10-06 21:15:44 +00:00
parent b9fcef5941
commit bbd170562e
1 changed files with 1 additions and 0 deletions

View File

@ -1470,6 +1470,7 @@ namespace libtorrent
{
policy::peer* p = static_cast<policy::peer*>(*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());
}