From 3c88f6f0cd571389dc111e7325c0dd26086a656e Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sat, 29 Oct 2016 16:41:29 +0300 Subject: [PATCH] Fix server crash caused by invalid player GUIDs --- apps/openmw-mp/Networking.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 8f7299f58..b9b98571c 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -707,6 +707,9 @@ void Networking::NewPlayer(RakNet::RakNetGUID guid) // If we are iterating over the new player, don't send the packets below if (pl->first == guid.g) continue; + // If an invalid key makes it into the Players map, ignore it + else if (pl->first == RakNet::UNASSIGNED_NETWORK_ID) continue; + playerController->GetPacket(ID_GAME_BASE_INFO)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_DYNAMICSTATS)->Send(pl->second, guid); playerController->GetPacket(ID_GAME_ATTRIBUTE)->Send(pl->second, guid);