Skip to content

Commit

Permalink
Skip unsupported Lighting modes #3195
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Sep 30, 2024
1 parent 4855733 commit 917fe11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/AsusMouseSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 917fe11

Please sign in to comment.