aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-account-manager.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index b9694a95b..2d6977d3c 100644
--- a/libempathy/empathy-account-manager.c
+++ b/libempathy/empathy-account-manager.c
@@ -299,6 +299,7 @@ account_manager_account_ready_cb (GObject *obj,
g_simple_async_result_complete (priv->create_result);
g_object_unref (priv->create_result);
+ priv->create_result = NULL;
}
g_signal_emit (manager, signals[ACCOUNT_CREATED], 0, account);
@@ -479,6 +480,16 @@ do_dispose (GObject *obj)
priv->dispose_run = TRUE;
+ if (priv->create_result != NULL)
+ {
+ g_simple_async_result_set_error (priv->create_result, G_IO_ERROR,
+ G_IO_ERROR_CANCELLED, "The account manager was disposed while "
+ "creating the account");
+ g_simple_async_result_complete (priv->create_result);
+ g_object_unref (priv->create_result);
+ priv->create_result = NULL;
+ }
+
tp_dbus_daemon_cancel_name_owner_watch (priv->dbus,
TP_ACCOUNT_MANAGER_BUS_NAME, account_manager_name_owner_cb, manager);