aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-03-25 11:12:52 +0000
committerConor Curran <conor.curran@canonical.com>2011-03-25 11:12:52 +0000
commite3550c53b92297fdaa84105c3fa9fd5b69d98e83 (patch)
treeafdeae4ee8c519ca5a52a9de4ad68252f9517c3e /src
parent4b955bef19d6a40d9da19a64ff4d0889ae3135a9 (diff)
downloadayatana-indicator-sound-e3550c53b92297fdaa84105c3fa9fd5b69d98e83.tar.gz
ayatana-indicator-sound-e3550c53b92297fdaa84105c3fa9fd5b69d98e83.tar.bz2
ayatana-indicator-sound-e3550c53b92297fdaa84105c3fa9fd5b69d98e83.zip
defensive touches to update state method
Diffstat (limited to 'src')
-rw-r--r--src/sound-service-dbus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sound-service-dbus.c b/src/sound-service-dbus.c
index 1b9d29e..ea96e6a 100644
--- a/src/sound-service-dbus.c
+++ b/src/sound-service-dbus.c
@@ -237,6 +237,12 @@ sound_service_dbus_update_sound_state (SoundServiceDbus* self,
GError * error = NULL;
+ if (priv->connection == NULL ||
+ g_dbus_connection_is_closed (priv->connection) == TRUE){
+ g_warning ("sound_service_dbus_update_sound_state - connection no good !!");
+ return;
+ }
+
g_debug ("emitting state signal with value %i", (int)new_state);
g_dbus_connection_emit_signal( priv->connection,
NULL,