diff --git a/osu.Game/Database/RealmAccess.cs b/osu.Game/Database/RealmAccess.cs index b729fdd8e8..917d662255 100644 --- a/osu.Game/Database/RealmAccess.cs +++ b/osu.Game/Database/RealmAccess.cs @@ -1022,10 +1022,10 @@ void convertOnlineIDs() where T : RealmObject { // Clear default bindings for the chat focus toggle, // as they would conflict with the newly-added leaderboard toggle. - var newKeyBindings = migration.NewRealm.All().ToList(); - var toggleChatBind = newKeyBindings.FirstOrDefault(bind => bind.ActionInt == (int)GlobalAction.ToggleChatFocus); + var keyBindings = migration.NewRealm.All(); - if (toggleChatBind != default && toggleChatBind.KeyCombination.Keys.SequenceEqual(new[] { InputKey.Tab })) + var toggleChatBind = keyBindings.FirstOrDefault(bind => bind.ActionInt == (int)GlobalAction.ToggleChatFocus); + if (toggleChatBind != null && toggleChatBind.KeyCombination.Keys.SequenceEqual(new[] { InputKey.Tab })) migration.NewRealm.Remove(toggleChatBind); break;