From 701d21c26fd8cc2d9c14a35de25027a7a003caca Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 6 Feb 2023 13:52:25 +0900 Subject: [PATCH] Apply single inspection from newer inspectcode verisons As found in rider EAPs. Appears as a warning and is annoying me occasionally. --- osu.Game/Overlays/ChatOverlay.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index c539cdc5ec..b44c7c48f5 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -315,10 +315,10 @@ namespace osu.Game.Overlays channelListing.Hide(); textBar.ShowSearch.Value = false; - if (loadedChannels.ContainsKey(newChannel)) + if (loadedChannels.TryGetValue(newChannel, out var loadedChannel)) { currentChannelContainer.Clear(false); - currentChannelContainer.Add(loadedChannels[newChannel]); + currentChannelContainer.Add(loadedChannel); } else {