aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-14 22:12:13 -0500
committerTed Gould <ted@gould.cx>2014-10-14 22:12:13 -0500
commit69b9c090d86e46a0af7e74e68ded1d0f5b4c52cd (patch)
treeb46eae368e34ce1ccb77b4d650ea433fd0a30181 /src
parentd7fbfc4d0babbcd54a3951f5da721153cc194d9b (diff)
downloadayatana-indicator-sound-69b9c090d86e46a0af7e74e68ded1d0f5b4c52cd.tar.gz
ayatana-indicator-sound-69b9c090d86e46a0af7e74e68ded1d0f5b4c52cd.tar.bz2
ayatana-indicator-sound-69b9c090d86e46a0af7e74e68ded1d0f5b4c52cd.zip
Check more precisely the valid roles
Diffstat (limited to 'src')
-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 5a7e66d..d666708 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -627,7 +627,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 */