From 52e2c2d3dce6ded517f9666d5d0412d56054d9d9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 14 Oct 2014 09:45:40 -0500 Subject: Ensure that we're always getting a vlue in the list --- src/volume-control.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/volume-control.vala b/src/volume-control.vala index b65cbc8..cf2dacf 100644 --- a/src/volume-control.vala +++ b/src/volume-control.vala @@ -624,7 +624,7 @@ public class VolumeControl : Object /* Choose a sound */ string? sound = null; - if (_active_sink_input == -1 || _valid_roles[_active_sink_input] != "multimedia") + if (!((_active_sink_input in _sink_input_list) && (_valid_roles[_active_sink_input] == "multimedia"))) sound = "/usr/share/sounds/ubuntu/stereo/message.ogg"; /* Check tint */ -- cgit v1.2.3