aboutsummaryrefslogtreecommitdiff
path: root/src/slider-menu-item.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-03-26 13:56:46 +0000
committerConor Curran <conor.curran@canonical.com>2010-03-26 13:56:46 +0000
commitd4f0b5072f4464aeb6fce4c2f2bc4c70b1287ba6 (patch)
treefe4d1e690e801c91841ddd958cddca5a5269f354 /src/slider-menu-item.c
parentce3a15ebdb4d172a12ba66936a76a1b6ebf1f931 (diff)
downloadayatana-indicator-sound-d4f0b5072f4464aeb6fce4c2f2bc4c70b1287ba6.tar.gz
ayatana-indicator-sound-d4f0b5072f4464aeb6fce4c2f2bc4c70b1287ba6.tar.bz2
ayatana-indicator-sound-d4f0b5072f4464aeb6fce4c2f2bc4c70b1287ba6.zip
handle event should now be safer
Diffstat (limited to 'src/slider-menu-item.c')
-rw-r--r--src/slider-menu-item.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/slider-menu-item.c b/src/slider-menu-item.c
index a14f4f9..cb72524 100644
--- a/src/slider-menu-item.c
+++ b/src/slider-menu-item.c
@@ -77,12 +77,14 @@ slider_menu_item_finalize (GObject *object)
}
-
static void
handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp)
{
g_debug("in the handle event method of slider_menu_item");
- set_sink_volume((gdouble)g_value_get_double(value));
+ gdouble volume_input = 0;
+ volume_input = g_value_get_double(value);
+ if(value != NULL)
+ set_sink_volume(volume_input);
}