Skip to content

Commit

Permalink
Fixed "save as" bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeoliphant committed Jul 16, 2024
1 parent 5f0215d commit 4c22add
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion StompboxShared/Interface/PluginInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,10 +1191,17 @@ public void SetEnumValues(IList<string> enumValues)

string selectedString = null;

if (menuItems.Count > 0)
if ((selectedIndex >= 0) && (selectedIndex < menuItems.Count))
{
selectedString = menuItems[selectedIndex].Text;
}
else
{
selectedString = null;
}

if (menuItems.Count > 0)
{
menuItems.Clear();
}

Expand Down

0 comments on commit 4c22add

Please sign in to comment.