summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-06-11 10:15:05 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-06-11 10:15:05 +0200
commit42c485ff56f5425cd592ae73c1c0e6c0f1de2b13 (patch)
treeca28d8381f336f0ab6bf94cdc576bf561395f93b
parent224443c1843ab0df7ef8ee1eda0409c35a4745a9 (diff)
downloadtelepathy-mission-control-42c485ff56f5425cd592ae73c1c0e6c0f1de2b13.tar.gz
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
-rw-r--r--src/mcd-account.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 48880bef..1ed237bb 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