avoid exploding in UnitOrders.cs

This commit is contained in:
Chris Forbes
2010-07-15 22:09:13 +12:00
parent 59f931b2f8
commit 1242a2c39b

View File

@@ -33,7 +33,9 @@ namespace OpenRA.Network
case "Chat":
{
var client = Game.LobbyInfo.Clients.FirstOrDefault(c => c.Index == clientId);
Game.AddChatLine(Game.world.PlayerColors()[client.PaletteIndex].Color, client.Name, order.TargetString);
if (client != null)
Game.AddChatLine(Game.world.PlayerColors()[client.PaletteIndex].Color,
client.Name, order.TargetString);
break;
}
case "TeamChat":