diff --git a/SAM.cpp b/SAM.cpp index ecdd513d..bcb4623a 100644 --- a/SAM.cpp +++ b/SAM.cpp @@ -49,7 +49,6 @@ namespace client { if (m_Session) { m_Session->DelSocket (shared_from_this ()); - m_Session = nullptr; } break; } @@ -58,8 +57,8 @@ namespace client if (m_Session) { m_Session->DelSocket (shared_from_this ()); - m_Session->localDestination->StopAcceptingStreams (); - m_Session = nullptr; + if (m_Session->localDestination) + m_Session->localDestination->StopAcceptingStreams (); } break; }