From ad1962e8c7ab45f105961a25e6b8311af50c6da8 Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> Date: Wed, 21 Jan 2009 15:33:36 -0500 Subject: [PATCH] Fix some dbus-glib implementation details on the client side --- sflphone-gtk/src/actions.c | 2 ++ sflphone-gtk/src/dbus.c | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index a381738b96..6efb5cbcc1 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -164,6 +164,8 @@ sflphone_fill_account_list(gboolean toolbarInitialized) { account_t * a = account_list_get_nth (i); GHashTable * details = (GHashTable *) dbus_account_details(a->accountID); + if( details == NULL ) + break; a->properties = details; gchar * status = g_hash_table_lookup(details, "Status"); diff --git a/sflphone-gtk/src/dbus.c b/sflphone-gtk/src/dbus.c index 9430a5a8ca..7ed21b2118 100644 --- a/sflphone-gtk/src/dbus.c +++ b/sflphone-gtk/src/dbus.c @@ -177,12 +177,12 @@ dbus_connect () { GError *error = NULL; + connection = NULL; g_type_init (); - error = NULL; - connection = dbus_g_bus_get (DBUS_BUS_SESSION, - &error); + connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); + if (connection == NULL) { g_printerr ("Failed to open connection to bus: %s\n", @@ -281,6 +281,7 @@ dbus_clean () { g_object_unref (callManagerProxy); g_object_unref (configurationManagerProxy); + g_object_unref (instanceProxy); } -- GitLab