Fix CA1854
This commit is contained in:
committed by
Pavel Penev
parent
c2568ebd1f
commit
c8efc5fdd7
@@ -361,14 +361,12 @@ namespace OpenRA.Mods.Common.Server
|
||||
{
|
||||
lock (server.LobbyInfo)
|
||||
{
|
||||
if (!server.LobbyInfo.Slots.ContainsKey(s))
|
||||
if (!server.LobbyInfo.Slots.TryGetValue(s, out var slot))
|
||||
{
|
||||
Log.Write("server", $"Invalid slot: {s}");
|
||||
return false;
|
||||
}
|
||||
|
||||
var slot = server.LobbyInfo.Slots[s];
|
||||
|
||||
if (slot.Closed || server.LobbyInfo.ClientInSlot(s) != null)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user