From 1356332496e747712b984271eeca32e13555a73b Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Fri, 7 Aug 2015 00:30:28 -0400 Subject: [PATCH] Avoid a possible null pointer error when logging on peer_connection::on_connection_complete. --- src/peer_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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