Fixed client exception when round ends

This commit is contained in:
juanjp600
2017-12-05 11:32:27 -03:00
parent 6993242373
commit ffbb327fb4

View File

@@ -119,7 +119,7 @@ namespace Barotrauma
if (GameMain.GameSession.Mission.Completed)
{
GameMain.Server.ConnectedClients.ForEach(c => c.Karma += 0.1f);
GameMain.Server?.ConnectedClients.ForEach(c => c.Karma += 0.1f);
}
if (GameMain.GameSession.Mission.Completed && singleplayer)
@@ -129,7 +129,7 @@ namespace Barotrauma
}
else
{
GameMain.Server.ConnectedClients.ForEach(c => c.Karma += 0.1f);
GameMain.Server?.ConnectedClients.ForEach(c => c.Karma += 0.1f);
}
return frame;