aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-10-12 13:40:53 -0500
committerTed Gould <ted@gould.cx>2011-10-12 13:40:53 -0500
commit3c872a3f8bd5c20b8798b3e29809ec3d60efd92d (patch)
treecce0f7976fa2e0b5053fc0b30118c030153f41e5 /src
parentf5e29e773bd56d7aa6e459c46db6f68a4dd7f845 (diff)
parente30cc3a7bab1409191d3003475eed46500d4f95f (diff)
downloadayatana-indicator-sound-3c872a3f8bd5c20b8798b3e29809ec3d60efd92d.tar.gz
ayatana-indicator-sound-3c872a3f8bd5c20b8798b3e29809ec3d60efd92d.tar.bz2
ayatana-indicator-sound-3c872a3f8bd5c20b8798b3e29809ec3d60efd92d.zip
Protect against source indexes that are lower than 0
Diffstat (limited to 'src')
-rw-r--r--src/pulseaudio-mgr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c
index a31084a..1da8ce1 100644
--- a/src/pulseaudio-mgr.c
+++ b/src/pulseaudio-mgr.c
@@ -174,6 +174,10 @@ reconnect_to_pulse (gpointer user_data)
void
pm_update_volume (gint sink_index, pa_cvolume new_volume)
{
+ // LP: #850662
+ if (sink_index < 0){
+ return;
+ }
pa_operation_unref (pa_context_set_sink_volume_by_index (pulse_context,
sink_index,
&new_volume,
@@ -192,6 +196,10 @@ pm_update_mute (gboolean update)
void
pm_update_mic_gain (gint source_index, pa_cvolume new_gain)
{
+ // LP: #850662
+ if (source_index < 0){
+ return;
+ }
pa_operation_unref (pa_context_set_source_volume_by_index (pulse_context,
source_index,
&new_gain,
@@ -202,6 +210,10 @@ pm_update_mic_gain (gint source_index, pa_cvolume new_gain)
void
pm_update_mic_mute (gint source_index, gint mute_update)
{
+ // LP: #850662
+ if (source_index < 0){
+ return;
+ }
pa_operation_unref (pa_context_set_source_mute_by_index (pulse_context,
source_index,
mute_update,