From: Sergio Villar Senin Date: Fri, 13 Jun 2008 09:59:45 +0000 (+0000) Subject: * Fixes NB#85859, fixes a crash when deleting an account X-Git-Tag: git_migration_finished~1315 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=988eb5d471c36275dbb99a608ae2d54babecdcbd * Fixes NB#85859, fixes a crash when deleting an account pmo-trunk-r4679 --- diff --git a/src/modest-tny-account-store.c b/src/modest-tny-account-store.c index 540446c..2e6c748 100644 --- a/src/modest-tny-account-store.c +++ b/src/modest-tny-account-store.c @@ -845,7 +845,7 @@ modest_tny_account_store_finalize (GObject *obj) } camel_shutdown (); - + G_OBJECT_CLASS(parent_class)->finalize (obj); } @@ -2045,10 +2045,10 @@ remove_connection_specific_transport_accounts (ModestTnyAccountStore *self) account = modest_tny_account_store_get_server_account (self, transport_account_name, TNY_ACCOUNT_TYPE_TRANSPORT); - if (account) { + + /* the call will free the reference */ + if (account) remove_transport_account (self, TNY_TRANSPORT_ACCOUNT (account)); - g_object_unref (account); - } } iter = g_slist_next (iter); }