Fixed client-side null exception when the client is in the lobby and a round ends with the mission successfully completed

This commit is contained in:
Joonas Rikkonen
2018-01-11 18:56:45 +02:00
parent 25ebe52248
commit 466e6f8833

View File

@@ -552,7 +552,7 @@ namespace Barotrauma.Networking
case ServerPacketHeader.ENDGAME:
string endMessage = inc.ReadString();
bool missionSuccessful = inc.ReadBoolean();
if (missionSuccessful && GameMain.GameSession.Mission != null)
if (missionSuccessful && GameMain.GameSession?.Mission != null)
{
GameMain.GameSession.Mission.Completed = true;
}