diff libpurple/conversation.c @ 16828:56823a55581a

Rework purple_buddy_icons_find() to return a reference for the caller, which is clearer and more consistent with other functions. Also, update purple_buddy_icons_set_for_user() to behave properly when called to clear an icon that isn't already in memory.
author Richard Laager <rlaager@wiktel.com>
date Thu, 03 May 2007 21:57:49 +0000
parents 5e47b3427b28
children 73556f13c3b5 f35329c1094e
line wrap: on
line diff
--- a/libpurple/conversation.c	Thu May 03 15:37:25 2007 +0000
+++ b/libpurple/conversation.c	Thu May 03 21:57:49 2007 +0000
@@ -279,7 +279,11 @@
 
 		ims = g_list_append(ims, conv);
 		if ((icon = purple_buddy_icons_find(account, name)))
+		{
 			purple_conv_im_set_icon(conv->u.im, icon);
+			/* purple_conv_im_set_icon refs the icon. */
+			purple_buddy_icon_unref(icon);
+		}
 
 		if (purple_prefs_get_bool("/purple/logging/log_ims"))
 		{