# HG changeset patch # User Christian Hammond # Date 1067032918 0 # Node ID 4963abdebd2948ae46b6df6d403832b3b91185fe # Parent 443fc7d6fbff14da19fce571ae19584c36909677 [gaim-migrate @ 7910] Fixed a crash when deleting an account that has IMs or chats open. Closes bug #821630. committer: Tailor Script diff -r 443fc7d6fbff -r 4963abdebd29 ChangeLog --- a/ChangeLog Fri Oct 24 15:37:17 2003 +0000 +++ b/ChangeLog Fri Oct 24 22:01:58 2003 +0000 @@ -4,6 +4,10 @@ * Added a search feature to conversations. * Fixed a crash in the Add Chat dialog when selecting an account that doesn't support chats. Closes bug #821606. + * Fixed a bug where new MSN accounts without buddies added wouldn't + connect. + * Fixed a crash when deleting an account that has IMs or chats open. + Closes bug #821630. * If SSL is not enabled, MSN will load, but error on connect. * Disable Jabber SASL auth until the standard stabilizes * Czech translation updated (Stanislav Brabec, Miloslav Trmac) diff -r 443fc7d6fbff -r 4963abdebd29 src/account.c --- a/src/account.c Fri Oct 24 15:37:17 2003 +0000 +++ b/src/account.c Fri Oct 24 22:01:58 2003 +0000 @@ -153,6 +153,8 @@ void gaim_account_destroy(GaimAccount *account) { + GList *l; + g_return_if_fail(account != NULL); gaim_debug(GAIM_DEBUG_INFO, "account", @@ -164,6 +166,14 @@ gaim_debug(GAIM_DEBUG_INFO, "account", "Continuing to destroy account %p\n", account); + for (l = gaim_get_conversations(); l != NULL; l = l->next) + { + GaimConversation *conv = (GaimConversation *)l->data; + + if (gaim_conversation_get_account(conv) == account) + gaim_conversation_set_account(conv, NULL); + } + if (account->username != NULL) g_free(account->username); if (account->alias != NULL) g_free(account->alias); if (account->password != NULL) g_free(account->password);