fix assertion failure when detroying moved-from session

When a session object is moved, all of its shared_ptrs become empty.
Don't assert in the dtor due to this, just do nothing.
This commit is contained in:
Steven Siloti 2020-03-30 15:01:55 -07:00 committed by Arvid Norberg
parent e9a30a34f2
commit 2d7875385e
1 changed files with 2 additions and 1 deletions

View File

@ -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