attempted fix for a crash in peer ranking

This commit is contained in:
Arvid Norberg 2013-10-23 06:45:23 +00:00
parent 568eac3f42
commit af6dbc5d79
1 changed files with 2 additions and 2 deletions

View File

@ -1147,8 +1147,8 @@ namespace libtorrent
boost::uint32_t peer_connection::peer_rank() const
{
return m_peer_info->rank(m_ses.external_address()
, m_ses.listen_port());
return m_peer_info == NULL ? 0
: m_peer_info->rank(m_ses.external_address(), m_ses.listen_port());
}
// message handlers