comparison libgaim/account.c @ 14909:c3a7d40d64bb

[gaim-migrate @ 17681] Modified sf patch #1590052, from Ari Pollak Fixes two possible crashes that can happen after deleting an account committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 06 Nov 2006 07:25:05 +0000
parents 05c34aabdcc3
children 9f3be32d0913
comparison
equal deleted inserted replaced
14908:fd321da41de4 14909:c3a7d40d64bb
2102 { 2102 {
2103 GaimBlistNode *gnode, *cnode, *bnode; 2103 GaimBlistNode *gnode, *cnode, *bnode;
2104 2104
2105 g_return_if_fail(account != NULL); 2105 g_return_if_fail(account != NULL);
2106 2106
2107 /*
2108 * Disable the account before blowing it out of the water.
2109 * Conceptually it probably makes more sense to disable the
2110 * account for all UIs rather than the just the current UI,
2111 * but it doesn't really matter.
2112 */
2113 gaim_account_set_enabled(account, gaim_core_get_ui(), FALSE);
2114
2107 if (gaim_account_is_connected(account)) 2115 if (gaim_account_is_connected(account))
2108 gaim_account_disconnect(account); 2116 gaim_account_disconnect(account);
2109 2117
2110 gaim_notify_close_with_handle(account); 2118 gaim_notify_close_with_handle(account);
2111 gaim_request_close_with_handle(account); 2119 gaim_request_close_with_handle(account);