aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-09-15 10:20:47 +0100
committerConor Curran <conor.curran@canonical.com>2010-09-15 10:20:47 +0100
commit01182ba70563b73014c5296e32e9b5eb16d66dbb (patch)
treec4f999a6dab33be51f9dede7c3aec99435e23fe2 /src
parent4b7abb73527b7ce240c15d408b00afa6a80a3c07 (diff)
downloadayatana-indicator-sound-01182ba70563b73014c5296e32e9b5eb16d66dbb.tar.gz
ayatana-indicator-sound-01182ba70563b73014c5296e32e9b5eb16d66dbb.tar.bz2
ayatana-indicator-sound-01182ba70563b73014c5296e32e9b5eb16d66dbb.zip
race condition indicator crash fixed when the service crashes - indicator should now seemlessly handle flaky service
Diffstat (limited to 'src')
-rw-r--r--src/indicator-sound.c11
-rw-r--r--src/sound-service.c4
2 files changed, 10 insertions, 5 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 0aa93b3..35045d7 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -365,7 +365,9 @@ connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer u
IndicatorSound* indicator = INDICATOR_SOUND(user_data);
fetch_sink_availability_from_dbus(indicator);
IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(indicator);
- determine_state_from_volume (volume_widget_get_current_volume(priv->volume_widget));
+ if(priv->volume_widget != NULL){
+ determine_state_from_volume (volume_widget_get_current_volume(priv->volume_widget));
+ }
}
}
else{
@@ -557,8 +559,11 @@ fetch_sink_availability_from_dbus(IndicatorSound* self)
}
IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(self);
- GtkWidget* slider_widget = volume_widget_get_ido_slider(VOLUME_WIDGET(priv->volume_widget));
- gtk_widget_set_sensitive(slider_widget, device_available);
+
+ if(priv->volume_widget != NULL){
+ GtkWidget* slider_widget = volume_widget_get_ido_slider(VOLUME_WIDGET(priv->volume_widget));
+ gtk_widget_set_sensitive(slider_widget, device_available);
+ }
g_free(available_input);
g_debug("IndicatorSound::fetch_sink_availability_from_dbus ->%i", device_available);
diff --git a/src/sound-service.c b/src/sound-service.c
index f19379d..51f5f37 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -41,8 +41,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;
}