From a7dd01e283f79f4a6e739a3e074dfcf23f39fe85 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 5 Aug 2011 12:49:38 +0200 Subject: Print warning if tp_account_manager_dup() fails --- telepathy-glib/account-manager.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'telepathy-glib/account-manager.c') diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c index 55fdfa7a3..d532e6627 100644 --- a/telepathy-glib/account-manager.c +++ b/telepathy-glib/account-manager.c @@ -730,14 +730,18 @@ TpAccountManager * tp_account_manager_dup (void) { TpDBusDaemon *dbus; + GError *error = NULL; if (starter_account_manager_proxy != NULL) return g_object_ref (starter_account_manager_proxy); - dbus = tp_dbus_daemon_dup (NULL); - + dbus = tp_dbus_daemon_dup (&error); if (dbus == NULL) - return NULL; + { + WARNING ("Error getting default TpDBusDaemon: %s", error->message); + g_clear_error (&error); + return NULL; + } starter_account_manager_proxy = tp_account_manager_new (dbus); g_assert (starter_account_manager_proxy != NULL); -- cgit v1.2.1