Fix use after free in NetworkClient and NetworkServer

This commit is contained in:
isJuhn authored and Adam Honse committed 2026-07-26 22:03:43 -05:00
1 parent acc7fa6754
commit 3b2466ba10
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -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;
}
/*-----------------------------------------------------*\