From 8fc5eca9d4aa4fdd039a7b8fba3f9fc211fb04ef Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 4 Aug 2021 21:22:06 +0200 Subject: [PATCH] Reset the singleton pointer in SessionManager's destructor. --- core/http/session_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/http/session_manager.cpp b/core/http/session_manager.cpp index ad3b6b8..a281527 100644 --- a/core/http/session_manager.cpp +++ b/core/http/session_manager.cpp @@ -129,6 +129,10 @@ SessionManager::SessionManager() : SessionManager::~SessionManager() { clear(); + + if (_self == this) { + _self = nullptr; + } } SessionManager *SessionManager::_self = nullptr; \ No newline at end of file