diff --git a/src/session.cpp b/src/session.cpp index eb08d5ce0..0a47f993e 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -384,8 +384,9 @@ namespace { session::~session() { + if (!m_impl) return; + aux::dump_call_profile(); - TORRENT_ASSERT(m_impl); // capture the shared_ptr in the dispatched function // to keep the session_impl alive