From 917fe112b8c720763dc920083aa48f7ce49786bd Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:24:14 +0200 Subject: [PATCH] Skip unsupported Lighting modes https://github.com/seerge/g-helper/issues/3195 --- app/AsusMouseSettings.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/AsusMouseSettings.cs b/app/AsusMouseSettings.cs index 220270f8e..73301edca 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);