aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-sanity-cleaning.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-08-28 16:53:42 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-08-28 16:53:42 +0800
commit838610a7545aca9f8209fef864153f0404fc7309 (patch)
tree5da80e6fd775ada94bc56fc03414e968806d8b34 /src/empathy-sanity-cleaning.c
parent2db1f1f4e345c20b92c3914551cbd8c7a0f79676 (diff)
downloadgsoc2013-empathy-838610a7545aca9f8209fef864153f0404fc7309.tar
gsoc2013-empathy-838610a7545aca9f8209fef864153f0404fc7309.tar.gz
gsoc2013-empathy-838610a7545aca9f8209fef864153f0404fc7309.tar.bz2
gsoc2013-empathy-838610a7545aca9f8209fef864153f0404fc7309.tar.lz
gsoc2013-empathy-838610a7545aca9f8209fef864153f0404fc7309.tar.xz
gsoc2013-empathy-838610a7545aca9f8209fef864153f0404fc7309.tar.zst
gsoc2013-empathy-838610a7545aca9f8209fef864153f0404fc7309.zip
Remove the old account even if we fail to create the new one
There is no point keeping a ghost account around.
Diffstat (limited to 'src/empathy-sanity-cleaning.c')
-rw-r--r--src/empathy-sanity-cleaning.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/empathy-sanity-cleaning.c b/src/empathy-sanity-cleaning.c
index 4b557d4fb..b60d800ec 100644
--- a/src/empathy-sanity-cleaning.c
+++ b/src/empathy-sanity-cleaning.c
@@ -286,7 +286,9 @@ static void
uoa_migration_done (UoaMigrationData *data)
{
tp_account_remove_async (data->old_account, NULL, NULL);
- tp_account_set_enabled_async (data->new_account, data->enabled, NULL, NULL);
+
+ if (data->new_account != NULL)
+ tp_account_set_enabled_async (data->new_account, data->enabled, NULL, NULL);
uoa_migration_data_free (data);
}
@@ -352,7 +354,7 @@ uoa_account_created_cb (GObject *source,
tp_account_get_path_suffix (data->old_account), error->message);
g_clear_error (&error);
- uoa_migration_data_free (data);
+ uoa_migration_done (data);
}
else
{