]> git.0d.be Git - empathy.git/commitdiff
Remove the old account even if we fail to create the new one
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 28 Aug 2012 08:53:42 +0000 (10:53 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 28 Aug 2012 08:53:42 +0000 (10:53 +0200)
There is no point keeping a ghost account around.

src/empathy-sanity-cleaning.c

index 4b557d4fbc3963312f665b9d68701d39d72bde95..b60d800ec4bdb4350dd5d3cb626c91c56090fe48 100644 (file)
@@ -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
     {