AppHost: Prevent null CycleControllers crash

This commit is contained in:
Barış Hamil 2024-09-21 21:27:43 +03:00
parent e911876f76
commit e3ffbd9ee5

View file

@ -1288,7 +1288,7 @@ namespace Ryujinx.Ava
state = KeyboardHotkeyState.VolumeDown;
}
foreach (var cycle in ConfigurationState.Instance.Hid.Hotkeys.Value.CycleControllers.Select((value, index) => (value, index)))
foreach (var cycle in ConfigurationState.Instance.Hid.Hotkeys.Value.CycleControllers?.Select((value, index) => (value, index)) ?? [])
{
if (_keyboardInterface.IsPressed((Key)cycle.value))
{