Commit graph

2 commits

Author SHA1 Message Date
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
Michael Murphy
95eda40878
feat(sound): use cosmic-settings-daemon's varlink API 2026-06-15 21:09:25 +02:00