From 7042004af3c22eafdb52a19536645a3cd1998f21 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 27 Sep 2014 20:02:30 +1200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20die=20when=20connecting=20to=20?= =?UTF-8?q?a=20full=20server.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenRA.Mods.Common/ServerTraits/ColorValidator.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs b/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs index 026bd67f47..bee0f54c95 100644 --- a/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs +++ b/OpenRA.Mods.Common/ServerTraits/ColorValidator.cs @@ -203,10 +203,9 @@ namespace OpenRA.Mods.Common.Server public void ClientJoined(S server, Connection conn) { var client = server.GetClient(conn); - var slot = server.LobbyInfo.Clients[client.Index].Slot; // Validate whether color is allowed and get an alternative if it isn't - if (!server.LobbyInfo.Slots[slot].LockColor) + if (client.Slot == null ||!server.LobbyInfo.Slots[client.Slot].LockColor) client.Color = ColorValidator.ValidatePlayerColorAndGetAlternative(server, client.Color, client.Index); }