[empathy] Remove the old account even if we fail to create the new one



commit 838610a7545aca9f8209fef864153f0404fc7309
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Tue Aug 28 10:53:42 2012 +0200

    Remove the old account even if we fail to create the new one
    
    There is no point keeping a ghost account around.

 src/empathy-sanity-cleaning.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-sanity-cleaning.c b/src/empathy-sanity-cleaning.c
index 4b557d4..b60d800 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
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]