telepathy-mission-control: mcd_account_delete: make sure that the account stays alive
George Kiagiadakis
gkiagia at kemper.freedesktop.org
Sat Jan 28 11:43:23 UTC 2017
Module: telepathy-mission-control
Branch: master
Commit: 42c485ff56f5425cd592ae73c1c0e6c0f1de2b13
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=42c485ff56f5425cd592ae73c1c0e6c0f1de2b13
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Wed Jun 11 10:15:05 2014 +0200
mcd_account_delete: make sure that the account stays alive
Fix a regression introduced when backporting fix for
https://bugs.freedesktop.org/show_bug.cgi?id=79827
---
src/mcd-account.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 48880be..1ed237b 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -774,6 +774,10 @@ mcd_account_delete (McdAccount *account,
mcd_storage_commit (priv->storage, name);
+ /* The callback may drop the latest ref on @account so make sure it stays
+ * alive while we still need it. */
+ g_object_ref (account);
+
if (callback != NULL)
callback (account, NULL, user_data);
@@ -788,6 +792,7 @@ mcd_account_delete (McdAccount *account,
}
unregister_dbus_service (account);
+ g_object_unref (account);
}
void
More information about the telepathy-commits
mailing list