aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-03-26 17:15:55 +0000
committerConor Curran <conor.curran@canonical.com>2010-03-26 17:15:55 +0000
commit67f913653040e4272ded30e423b907772c32d74c (patch)
tree55cfa009ee8dbe996328c551aa985d2b04bda90a
parentce3a15ebdb4d172a12ba66936a76a1b6ebf1f931 (diff)
parentd4f0b5072f4464aeb6fce4c2f2bc4c70b1287ba6 (diff)
downloadayatana-indicator-sound-67f913653040e4272ded30e423b907772c32d74c.tar.gz
ayatana-indicator-sound-67f913653040e4272ded30e423b907772c32d74c.tar.bz2
ayatana-indicator-sound-67f913653040e4272ded30e423b907772c32d74c.zip
Merged in fix for slider handle event crash - (unintialized memory bug)
-rw-r--r--src/slider-menu-item.c6
-rw-r--r--src/sound-service.c4
2 files changed, 6 insertions, 4 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);
}
diff --git a/src/sound-service.c b/src/sound-service.c
index 64ff69e..0b5320a 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -44,8 +44,8 @@ service_shutdown (IndicatorService *service, gpointer user_data)
if (mainloop != NULL) {
g_debug("Service shutdown !");
// TODO: uncomment for release !!
- close_pulse_activites();
- g_main_loop_quit(mainloop);
+ close_pulse_activites();
+ g_main_loop_quit(mainloop);
}
return;
}