aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-idle.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:46:04 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-07 00:46:04 +0800
commit7b293aff4cbfa6f28b906d72605813c40b7b0ed6 (patch)
tree4fe2c2c630f9879581cbd64ed5c374bba1a832ae /libempathy/empathy-idle.c
parent6ef34909df59304871330b9311430eb4116873a5 (diff)
downloadgsoc2013-empathy-7b293aff4cbfa6f28b906d72605813c40b7b0ed6.tar
gsoc2013-empathy-7b293aff4cbfa6f28b906d72605813c40b7b0ed6.tar.gz
gsoc2013-empathy-7b293aff4cbfa6f28b906d72605813c40b7b0ed6.tar.bz2
gsoc2013-empathy-7b293aff4cbfa6f28b906d72605813c40b7b0ed6.tar.lz
gsoc2013-empathy-7b293aff4cbfa6f28b906d72605813c40b7b0ed6.tar.xz
gsoc2013-empathy-7b293aff4cbfa6f28b906d72605813c40b7b0ed6.tar.zst
gsoc2013-empathy-7b293aff4cbfa6f28b906d72605813c40b7b0ed6.zip
Don't set random values in EmpathyIdle init if MC is not running.
svn path=/trunk/; revision=2026
Diffstat (limited to 'libempathy/empathy-idle.c')
-rw-r--r--libempathy/empathy-idle.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index bc40cc899..d9c8178e8 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -402,11 +402,16 @@ empathy_idle_init (EmpathyIdle *idle)
idle->priv = priv;
priv->is_idle = FALSE;
priv->mc = empathy_mission_control_new ();
- priv->state = mission_control_get_presence_actual (priv->mc, NULL);
- priv->status = mission_control_get_presence_message_actual (priv->mc, NULL);
- if (G_STR_EMPTY (priv->status)) {
+ priv->state = mission_control_get_presence_actual (priv->mc, &error);
+ if (error) {
+ priv->state = MC_PRESENCE_UNSET;
+ g_clear_error (&error);
+ }
+ priv->status = mission_control_get_presence_message_actual (priv->mc, &error);
+ if (error) {
g_free (priv->status);
priv->status = NULL;
+ g_clear_error (&error);
}
dbus_g_proxy_connect_signal (DBUS_G_PROXY (priv->mc),