aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/volume-warning-pulse.vala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/volume-warning-pulse.vala b/src/volume-warning-pulse.vala
index 335c8bf..918595b 100644
--- a/src/volume-warning-pulse.vala
+++ b/src/volume-warning-pulse.vala
@@ -73,10 +73,11 @@ public class VolumeWarningPulse : VolumeWarning
GLib.return_if_fail(_multimedia_sink_index != PulseAudio.INVALID_INDEX);
_pulse_context.get_sink_info_by_index(_multimedia_sink_index, (c,i) => {
- GLib.return_if_fail(i != null);
- GLib.message("setting multimedia_volume to %s", i.volume.to_string());
- _multimedia_cvolume = i.volume;
- multimedia_volume = i.volume.max();
+ if (i != null) {
+ GLib.message("setting multimedia_volume to %s", i.volume.to_string());
+ _multimedia_cvolume = i.volume;
+ multimedia_volume = i.volume.max();
+ }
});
}