diff 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
line wrap: on
line diff
--- a/libgaim/account.c	Mon Nov 06 06:54:14 2006 +0000
+++ b/libgaim/account.c	Mon Nov 06 07:25:05 2006 +0000
@@ -2104,6 +2104,14 @@
 
 	g_return_if_fail(account != NULL);
 
+	/*
+	 * Disable the account before blowing it out of the water.
+	 * Conceptually it probably makes more sense to disable the
+	 * account for all UIs rather than the just the current UI,
+	 * but it doesn't really matter.
+	 */
+	gaim_account_set_enabled(account, gaim_core_get_ui(), FALSE);
+
 	if (gaim_account_is_connected(account))
 		gaim_account_disconnect(account);