From e2c4cf49e2d54ea4480d20823d35eb55fb401e68 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sun, 21 Nov 2021 00:03:02 +0100 Subject: [PATCH] NetPlayServer: Clear remaining m_players when netplay thread ends so that their destructors can run while the ENetHost still exists. --- Source/Core/Core/NetPlayServer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index bc96d0f952..fc4f1da4d2 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -357,7 +357,8 @@ void NetPlayServer::ThreadFunc() ClearPeerPlayerId(player_entry.second.socket); enet_peer_disconnect(player_entry.second.socket, 0); } -} // namespace NetPlay + m_players.clear(); +} static void SendSyncIdentifier(sf::Packet& spac, const SyncIdentifier& sync_identifier) {