Skip to content

Commit

Permalink
Fix crash when removing a sound
Browse files Browse the repository at this point in the history
  • Loading branch information
bwestley committed Jun 28, 2023
1 parent 7c4aeb8 commit 9214158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ impl eframe::App for Soundboard {
if action.0 == 1 {
drop(self.config.sounds.remove(action.1));
self.sound_key_buttons.remove(action.1 + 1); // because [0] is new_sound
self.audio_controls.remove(action.1 + 1);
self.audio_controls.remove(action.1);
} else if action.0 == 2 {
self.config.sounds.swap(action.1, action.2);
self.sound_key_buttons.swap(action.1 + 1, action.2 + 1); // because [0] is new_sound
Expand Down

0 comments on commit 9214158

Please sign in to comment.