From 97be0f937cd846e5fc601dad73732489a1c7adb8 Mon Sep 17 00:00:00 2001 From: Dogukan Date: Fri, 23 Oct 2020 12:42:24 +0200 Subject: [PATCH] [Cleanup] cleaned a null checking if-statement for the lobby id --- Client/Client.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client/Client.cs b/Client/Client.cs index 2c15fd6..26e1adc 100644 --- a/Client/Client.cs +++ b/Client/Client.cs @@ -193,8 +193,8 @@ namespace Client foreach (var item in Lobbies) { Debug.WriteLine("[CLIENT] lobby data: {0}", item.Users.Count); - if (data.Lobby != null && item.ID == data.Lobby.ID) - ViewModels.ViewModelGame.HandleIncomingPlayer(item); + if (item.ID == data.Lobby?.ID) + IncomingPlayer?.Invoke(item); } }