attempted fix for a crash in peer ranking
This commit is contained in:
parent
568eac3f42
commit
af6dbc5d79
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue