changeset 13880:b869ab32cccc

[gaim-migrate @ 16358] Fix an assertion failure when adding a buddy to your buddy list and you have an open conversation with that buddy and you don't have an icon for them. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 27 Jun 2006 16:28:20 +0000
parents b5ff22440a5b
children 5d5e249c488e
files src/gtkblist.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Tue Jun 27 06:50:52 2006 +0000
+++ b/src/gtkblist.c	Tue Jun 27 16:28:20 2006 +0000
@@ -4461,9 +4461,10 @@
 add_buddy_cb(GtkWidget *w, int resp, GaimGtkAddBuddyData *data)
 {
 	const char *grp, *who, *whoalias;
-	GaimConversation *c;
+	GaimGroup *g;
 	GaimBuddy *b;
-	GaimGroup *g;
+	GaimConversation *c;
+	GaimBuddyIcon *icon;
 
 	if (resp == GTK_RESPONSE_OK)
 	{
@@ -4500,7 +4501,9 @@
 
 		c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, data->account);
 		if (c != NULL) {
-			gaim_buddy_icon_update(gaim_conv_im_get_icon(GAIM_CONV_IM(c)));
+			icon = gaim_conv_im_get_icon(GAIM_CONV_IM(c));
+			if (icon != NULL)
+				gaim_buddy_icon_update(icon);
 		}
 	}