Merge pull request #8395 from Mailaender/pause-world-nre

Fixed null reference exception when processing the Pause order
This commit is contained in:
Pavel Penev
2015-06-17 18:05:51 +03:00

View File

@@ -117,7 +117,7 @@ namespace OpenRA.Network
if (client != null)
{
var pause = order.TargetString == "Pause";
if (orderManager.World.Paused != pause && !world.LobbyInfo.IsSinglePlayer)
if (orderManager.World.Paused != pause && world != null && !world.LobbyInfo.IsSinglePlayer)
{
var pausetext = "The game is {0} by {1}".F(pause ? "paused" : "un-paused", client.Name);
Game.AddChatLine(Color.White, "", pausetext);