mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-10-04 22:26:30 +00:00
Fix server crash if player is not fully connected
This commit is contained in:
parent
3ee82a761b
commit
f74734cfba
1 changed files with 3 additions and 0 deletions
|
@ -742,6 +742,9 @@ void Networking::newPlayer(RakNet::RakNetGUID guid)
|
||||||
// If an invalid key makes it into the Players map, ignore it
|
// If an invalid key makes it into the Players map, ignore it
|
||||||
else if (pl->first == RakNet::UNASSIGNED_RAKNET_GUID) continue;
|
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
|
// If we are iterating over a player who has inputted their name, proceed
|
||||||
else if (pl->second->getLoadState() == Player::POSTLOADED)
|
else if (pl->second->getLoadState() == Player::POSTLOADED)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue