Skip to content

Commit

Permalink
fix: panic after inline reply
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Aug 14, 2024
1 parent 7382b4b commit 6c792ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lala_bar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,10 @@ impl MultiApplication for LalaMusicBar {
commands.push(Command::single(Action::Window(WindowAction::Close(*id))));
}

let removed_unit = self.notifications.remove(&removed_id).unwrap();
let Some(removed_unit) = self.notifications.remove(&removed_id) else {
// NOTE: already removed
return Command::none();
};

for (_, notify) in self.notifications.iter_mut() {
if notify.counter > removed_unit.counter {
Expand Down

0 comments on commit 6c792ec

Please sign in to comment.