changeset 7970:a6eb0e250417

[gaim-migrate @ 8647] fix the crash when chats are still open and an account signs off committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 01 Jan 2004 18:20:01 +0000
parents 69c511278aef
children 6fca0d9cc98b
files src/blist.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/blist.c	Thu Jan 01 17:49:53 2004 +0000
+++ b/src/blist.c	Thu Jan 01 18:20:01 2004 +0000
@@ -1343,12 +1343,18 @@
 	g_return_val_if_fail(gaim_get_blist() != NULL, NULL);
 	g_return_val_if_fail(name != NULL, NULL);
 
+	if(!gaim_account_is_connected(account))
+		return NULL;
+
 	for (group = gaimbuddylist->root; group != NULL; group = group->next) {
 		for (node = group->child; node != NULL; node = node->next) {
 			if (GAIM_BLIST_NODE_IS_CHAT(node)) {
 
 				chat = (GaimChat*)node;
 
+				if(!gaim_account_is_connected(chat->account))
+					continue;
+
 				prpl = gaim_find_prpl(gaim_account_get_protocol_id(chat->account));
 				prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);