[empathy/mc5: 202/483] Cancel the creation thread in dispose()
- From: Sjoerd Simons <sjoerds src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy/mc5: 202/483] Cancel the creation thread in dispose()
- Date: Fri, 21 Aug 2009 17:16:23 +0000 (UTC)
commit 8159c9cf091d3474702df58b04dcd11783109ab7
Author: Cosimo Cecchi <cosimo cecchi collabora co uk>
Date: Sat Jul 25 17:01:33 2009 +0200
Cancel the creation thread in dispose()
libempathy/empathy-account-manager.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-account-manager.c b/libempathy/empathy-account-manager.c
index b9694a9..2d6977d 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]