diff --git a/app/AsusMouseSettings.cs b/app/AsusMouseSettings.cs index 220270f8..73301edc 100644 --- a/app/AsusMouseSettings.cs +++ b/app/AsusMouseSettings.cs @@ -326,6 +326,12 @@ private void ComboBoxLightingMode_DropDownClosed(object? sender, EventArgs e) return; } + if (comboBoxLightingMode.SelectedIndex >= supportedLightingModes.Count) + { + // Unsupported mode + return; + } + LightingMode lm = supportedLightingModes[comboBoxLightingMode.SelectedIndex]; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone);