diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index b38a16f78..a713f6131 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -6227,7 +6227,7 @@ namespace libtorrent #ifndef TORRENT_DISABLE_LOGGING { boost::shared_ptr 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