diff src/dialogs.c @ 6088:4314e6be74c4

[gaim-migrate @ 6547] Fix removing groups containing chats, thanks to javabsp. Make sound prefs with empty file names show up as "(default)" rather than an empty input box. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 11 Jul 2003 05:10:56 +0000
parents 3a40666c08b4
children 786adff640e1
line wrap: on
line diff
--- a/src/dialogs.c	Fri Jul 11 04:38:40 2003 +0000
+++ b/src/dialogs.c	Fri Jul 11 05:10:56 2003 +0000
@@ -424,13 +424,18 @@
 		if(GAIM_BLIST_NODE_IS_BUDDY(b)) {
 			struct buddy *bd = (struct buddy *)b;
 			GaimConversation *c = gaim_find_conversation(bd->name);
-			if(bd->account->gc) {
+			if (gaim_account_is_connected(bd->account)) {
 				serv_remove_buddy(bd->account->gc, bd->name, g->name);
 				gaim_blist_remove_buddy(bd);
 
 				if (c != NULL)
 					gaim_conversation_update(c, GAIM_CONV_UPDATE_REMOVE);
 			}
+		} else if(GAIM_BLIST_NODE_IS_CHAT(b)) {
+			struct chat *chat = (struct chat *)b;
+			if (gaim_account_is_connected(chat->account)) {
+				gaim_blist_remove_chat(chat);
+			}
 		}
 		b = b->next;
 	}