cosmic-applets/cosmic-applet-audio/src
agrimkasaju 82e7cd814a fix(audio): adjust active device index on node removal
When an audio device preceding the active sink or source is removed,
the internal vector elements shift left, but self.active was not decremented.
Subsequent volume or mute events accessed an out-of-bounds index, causing
an immediate panic:

    thread 'main' panicked at cosmic-applet-audio/src/model.rs:116:64:
    index out of bounds: the len is 6 but the index is 6

Fix by decrementing self.active when active > pos in Nodes::remove.

Fixes #1508

Assisted-by: AI (Google Antigravity)
2026-09-23 12:48:55 -06:00
..
config.rs feat(audio): respect amplification config 2025-09-12 23:33:31 -04:00
lib.rs chore: adapt to changes in libcosmic 2026-09-11 21:44:38 +02:00
localize.rs chore: apply recommendations from clippy 2025-10-04 02:51:18 +02:00
main.rs chore: add SPDX license identifiers 2024-05-06 21:56:50 +02:00
model.rs fix(audio): adjust active device index on node removal 2026-09-23 12:48:55 -06:00
mouse_area.rs feat(sound): use cosmic-settings-daemon's varlink API 2026-06-15 21:09:25 +02:00
mpris_subscription.rs update libcosmic after reexports are removed 2026-04-16 15:27:25 -06:00