From bfc485869ee1c8d27f194f5fe0b053d1550b03b5 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Wed, 26 Oct 2011 11:07:46 -0400 Subject: protect pulse manager from rogue null pulse contexts i.e. when pulse randomly dies --- src/pulseaudio-mgr.c | 4 ++-- 1 file 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, -- cgit v1.2.3