diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index a381738b964ea2df33c5a96f65d85e3255c72e98..6efb5cbcc125d58bc629f2cddcf0b1107a4e7471 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 9430a5a8caed103b79e54da6034056d40be2d1f2..7ed21b2118a4241b4dffd5ef73e120a12848ffe4 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); }