Avoid a possible null pointer error when logging on peer_connection::on_connection_complete.

This commit is contained in:
Alden Torres 2015-08-07 00:30:28 -04:00
parent a91e7ce25d
commit 1356332496
1 changed files with 1 additions and 1 deletions

View File

@ -6227,7 +6227,7 @@ namespace libtorrent
#ifndef TORRENT_DISABLE_LOGGING
{
boost::shared_ptr<torrent> t = m_torrent.lock();
t->debug_log("END connect [%p]", this);
if (t) t->debug_log("END connect [%p]", this);
m_connect_time = completed;
}
#endif