aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-14 22:15:27 -0500
committerTed Gould <ted@gould.cx>2014-10-14 22:15:27 -0500
commit9df8760dbe15d187e133c53a4f93a421f4178445 (patch)
tree45c23ca023f25095cc5e195288f76e95de4f49ed /src/volume-control.vala
parentdf076876ee9adc237818a3a11fa4010b945f0987 (diff)
parent69b9c090d86e46a0af7e74e68ded1d0f5b4c52cd (diff)
downloadayatana-indicator-sound-9df8760dbe15d187e133c53a4f93a421f4178445.tar.gz
ayatana-indicator-sound-9df8760dbe15d187e133c53a4f93a421f4178445.tar.bz2
ayatana-indicator-sound-9df8760dbe15d187e133c53a4f93a421f4178445.zip
Moar checking
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index bdfe5bf..fb29d52 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -626,7 +626,8 @@ public class VolumeControl : Object
/* Choose a sound */
string? sound = null;
- if (!((_active_sink_input in _sink_input_list) && (_valid_roles[_active_sink_input] == "multimedia")))
+ if (!((_active_sink_input >= 0) && (_active_sink_input < _valid_roles.length)
+ && (_valid_roles[_active_sink_input] == "multimedia")))
sound = "/usr/share/sounds/ubuntu/stereo/message.ogg";
/* Check tint */