Merge pull request #10238 from peppy/fix-hoc-keyboard-shortcut-hard-crash

Fix hard crash on hitting an out of range key (Q~P)
This commit is contained in:
Dan Balasescu 2020-09-25 14:44:14 +09:00 committed by GitHub
commit d9fee594ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ protected override bool OnKeyDown(KeyDownEvent e)
if (checkRightToggleFromKey(e.Key, out var rightIndex))
{
var item = togglesCollection.Children[rightIndex];
var item = togglesCollection.ElementAtOrDefault(rightIndex);
if (item is SettingsCheckbox checkbox)
{