diff src/account.c @ 10384:b234ad7e0dfe

[gaim-migrate @ 11610] I think this is a better fix for the jabber problem. I think that gaim_account_get_connection should never return NULL when called inside a prpl from a function being called by the core. I think ChipX86 wrote the code that I'm changing that made account->gc = NULL. So if he has any objections, he should raise them. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 15 Dec 2004 22:25:55 +0000
parents 19974fd2d61d
children aab0c9508318
line wrap: on
line diff
--- a/src/account.c	Wed Dec 15 21:03:19 2004 +0000
+++ b/src/account.c	Wed Dec 15 22:25:55 2004 +0000
@@ -256,11 +256,13 @@
 
 	gaim_debug_info("account", "Disconnecting account %p\n", account);
 
+	account->disconnecting = TRUE;
 	gc = gaim_account_get_connection(account);
 
+	gaim_connection_disconnect(gc);
+
 	gaim_account_set_connection(account, NULL);
-
-	gaim_connection_disconnect(gc);
+	account->disconnecting = FALSE;
 }
 
 void