changeset 11527:b1f8151e6ae5

[gaim-migrate @ 13776] Fix for yahoo chats crashing occasionally on win32, mostly from Bleeter with a tweak or two from me committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 12 Sep 2005 14:47:52 +0000
parents 744b70723801
children 227b498921ae
files src/protocols/yahoo/yahoochat.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoochat.c	Mon Sep 12 14:45:49 2005 +0000
+++ b/src/protocols/yahoo/yahoochat.c	Mon Sep 12 14:47:52 2005 +0000
@@ -351,7 +351,6 @@
 	GSList *l;
 	GList *members = NULL;
 	GList *roomies = NULL;
-	GaimConversationUiOps *ops;
 	char *room = NULL;
 	char *topic = NULL;
 	char *someid, *someotherid, *somebase64orhashosomething, *somenegativenumber;
@@ -450,22 +449,23 @@
 		yahoo_chat_add_users(GAIM_CONV_CHAT(c), members);
 	}
 
-	ops = gaim_conversation_get_ui_ops(c);
 
-	for (l = account->deny; l != NULL; l = l->next) {
-		for (roomies = members; roomies; roomies = roomies->next) {
-			if (!gaim_utf8_strcasecmp((char *)l->data, roomies->data)) {
-				gaim_debug_info("yahoo", "Ignoring room member %s in room %s\n" ,roomies->data, room);
-				gaim_conv_chat_ignore(GAIM_CONV_CHAT(c),roomies->data);
-				ops->chat_update_user((c), roomies->data);
+	if (account->deny && c) {
+		GaimConversationUiOps *ops = gaim_conversation_get_ui_ops(c);
+		for (l = account->deny; l != NULL; l = l->next) {
+			for (roomies = members; roomies; roomies = roomies->next) {
+				if (!gaim_utf8_strcasecmp((char *)l->data, roomies->data)) {
+					gaim_debug_info("yahoo", "Ignoring room member %s in room %s\n" , roomies->data, room ? room : "");
+					gaim_conv_chat_ignore(GAIM_CONV_CHAT(c),roomies->data);
+					ops->chat_update_user(c, roomies->data);
+				}
 			}
 		}
 	}
 	g_list_free(roomies);
 	g_list_free(members);
 	g_free(room);
-	if (topic)
-		g_free(topic);
+	g_free(topic);
 }
 
 void yahoo_process_chat_exit(GaimConnection *gc, struct yahoo_packet *pkt)