diff --git a/NetworkClient.cpp b/NetworkClient.cpp index 8c239a608..3832ff13e 100644 --- a/NetworkClient.cpp +++ b/NetworkClient.cpp @@ -296,14 +296,14 @@ void NetworkClient::StopClient() /*-----------------------------------------------------*\ | Close the ProfileManager listen thread | \*-----------------------------------------------------*/ - if(profilemanager_thread->thread) + if(profilemanager_thread) { profilemanager_thread->online = false; profilemanager_thread->start_cv.notify_all(); profilemanager_thread->thread->join(); delete profilemanager_thread->thread; - profilemanager_thread->thread = nullptr; delete profilemanager_thread; + profilemanager_thread = nullptr; } /*-----------------------------------------------------*\ diff --git a/NetworkServer.cpp b/NetworkServer.cpp index d8416213a..eeee172ec 100644 --- a/NetworkServer.cpp +++ b/NetworkServer.cpp @@ -567,14 +567,14 @@ void NetworkServer::StopServer() /*-----------------------------------------------------*\ | Close the ProfileManager listen thread | \*-----------------------------------------------------*/ - if(profilemanager_thread->thread) + if(profilemanager_thread) { profilemanager_thread->online = false; profilemanager_thread->start_cv.notify_all(); profilemanager_thread->thread->join(); delete profilemanager_thread->thread; - profilemanager_thread->thread = nullptr; delete profilemanager_thread; + profilemanager_thread = nullptr; } /*-----------------------------------------------------*\