From: Dirk-Jan C. Binnema Date: Fri, 16 Nov 2007 10:56:21 +0000 (+0000) Subject: * disconnecting the account before removing the cache, because X-Git-Tag: git_migration_finished~2077 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=c170ec4bf55d203ce2dca06f59d06f5a9cf3865b * disconnecting the account before removing the cache, because disconnecting *after* it would write the cache once more.. pmo-trunk-r3750 --- diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index d2ba6a6..0011265 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -1660,12 +1660,16 @@ on_account_removed (ModestAccountMgr *acc_mgr, const gchar *account, /* If there was any problem creating the account, for example, with the configuration system this could not exist */ if (store_account) { + + /* do this before deleting the cache */ + account_disconnect (store_account); + /* Clear the cache */ tny_store_account_delete_cache (TNY_STORE_ACCOUNT (store_account)); /* Notify the observers */ g_signal_emit (G_OBJECT (self), signals [ACCOUNT_REMOVED_SIGNAL], 0, store_account); - account_disconnect (store_account); /* disconnect the account */ + g_object_unref (store_account); } else { g_warning ("There is no store account for account %s\n", account);