From 92141588b5d527831801f39c7c885a5839397662 Mon Sep 17 00:00:00 2001 From: Brendan Westley Date: Wed, 28 Jun 2023 12:36:39 -0500 Subject: [PATCH] Fix crash when removing a sound --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 14c4182..1bc065f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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