aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-10-26 11:07:46 -0400
committerConor Curran <conor.curran@canonical.com>2011-10-26 11:07:46 -0400
commitbfc485869ee1c8d27f194f5fe0b053d1550b03b5 (patch)
tree4ced70df605d7f36d83647c6387768159335b6a2
parent2d85ce77dba8f72869788093a8197c151ea899ce (diff)
downloadayatana-indicator-sound-bfc485869ee1c8d27f194f5fe0b053d1550b03b5.tar.gz
ayatana-indicator-sound-bfc485869ee1c8d27f194f5fe0b053d1550b03b5.tar.bz2
ayatana-indicator-sound-bfc485869ee1c8d27f194f5fe0b053d1550b03b5.zip
protect pulse manager from rogue null pulse contexts i.e. when pulse randomly dies
-rw-r--r--src/pulseaudio-mgr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulseaudio-mgr.c b/src/pulseaudio-mgr.c
index 1da8ce1..ad6d34f 100644
--- a/src/pulseaudio-mgr.c
+++ b/src/pulseaudio-mgr.c
@@ -175,7 +175,7 @@ void
pm_update_volume (gint sink_index, pa_cvolume new_volume)
{
// LP: #850662
- if (sink_index < 0){
+ if (sink_index < 0 || pulse_context == NULL){
return;
}
pa_operation_unref (pa_context_set_sink_volume_by_index (pulse_context,
@@ -197,7 +197,7 @@ void
pm_update_mic_gain (gint source_index, pa_cvolume new_gain)
{
// LP: #850662
- if (source_index < 0){
+ if (source_index < 0 || pulse_context == NULL){
return;
}
pa_operation_unref (pa_context_set_source_volume_by_index (pulse_context,