From f74734cfba70e8a0732a4222174a5e353cc3c7ed Mon Sep 17 00:00:00 2001 From: Koncord Date: Fri, 16 Dec 2016 17:53:56 +0800 Subject: [PATCH] Fix server crash if player is not fully connected --- 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 755db9827..e8a0ce3de 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -742,6 +742,9 @@ void Networking::newPlayer(RakNet::RakNetGUID guid) // If an invalid key makes it into the Players map, ignore it else if (pl->first == RakNet::UNASSIGNED_RAKNET_GUID) continue; + // if player not fully connected + else if (pl->second == nullptr) continue; + // If we are iterating over a player who has inputted their name, proceed else if (pl->second->getLoadState() == Player::POSTLOADED) {