Fix hard crash on hitting an out of range key (Q~P)

This commit is contained in:
Dean Herbert
2020-09-25 13:25:42 +09:00
parent 73ea527ec7
commit 325bfdbf71

View File

@ -205,7 +205,7 @@ namespace osu.Game.Rulesets.Edit
if (checkRightToggleFromKey(e.Key, out var rightIndex)) if (checkRightToggleFromKey(e.Key, out var rightIndex))
{ {
var item = togglesCollection.Children[rightIndex]; var item = togglesCollection.ElementAtOrDefault(rightIndex);
if (item is SettingsCheckbox checkbox) if (item is SettingsCheckbox checkbox)
{ {