From 365f0a5af2b6327531f49a0fa3754359063dfea1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 9 Oct 2014 21:54:40 -0500 Subject: Catch the error that show can throw and present a warning --- src/volume-control.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/volume-control.vala b/src/volume-control.vala index 86b976e..dbc1797 100644 --- a/src/volume-control.vala +++ b/src/volume-control.vala @@ -594,7 +594,12 @@ public class VolumeControl : Object } else { _notification.set_hint ("sound-file", null); } - _notification.show (); + + try { + _notification.show (); + } catch (GLib.Error e) { + warning("Unable to send volume change notification: %s", e.message); + } } if (set_volume_internal (volume)) { -- cgit v1.2.3