Skip to content

Commit

Permalink
voices.py: fix error when menu changes to be shorter than stored sele…
Browse files Browse the repository at this point in the history
…ction.
  • Loading branch information
dpwe committed Jan 7, 2025
1 parent 133790d commit 537f711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tulip/shared/py/voices.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def replace_items(self, items):
self.button_texts.append(i)

def select(self, index, defer=False):
if(self.selected is not None):
if self.selected is not None and self.selected < len(self.buttons):
self.buttons[self.selected].set_style_bg_color(tulip.pal_to_lv(self.default_bg), 0)
self.selected = index
if index is not None:
Expand Down

0 comments on commit 537f711

Please sign in to comment.