im.pidgin.pidgin.2.2.2: dec9d46c805f57604296fe25fcd872dd84b8c3fd

lschiere at pidgin.im lschiere at pidgin.im
Sun Oct 21 01:17:43 EDT 2007


-----------------------------------------------------------------
Revision: dec9d46c805f57604296fe25fcd872dd84b8c3fd
Ancestor: 16d41f5173adb77fade74bfb21aad4271285f5e3
Author: lschiere at pidgin.im
Date: 2007-10-21T04:49:59
Branch: im.pidgin.pidgin.2.2.2

Modified files:
        libpurple/buddyicon.c

ChangeLog: 

applied changes from 3ae1e4b3dac8092886b4b8ab961d8d505433b4c4
             through 4d5bbc54236419e777e3df044678b798605409bf

-------------- next part --------------
============================================================
--- libpurple/buddyicon.c	63ef54c38b55e0d47c7eddb64ae98aeeac8033be
+++ libpurple/buddyicon.c	78316942ada9202600bf1b0112fbba0b20337eef
@@ -505,37 +505,33 @@ purple_buddy_icons_set_for_user(PurpleAc
 		purple_buddy_icon_set_data(icon, icon_data, icon_len, checksum);
 	else if (icon_data && icon_len > 0)
 	{
-		if (icon_data != NULL && icon_len > 0)
-		{
-			PurpleBuddyIcon *icon = purple_buddy_icon_new(account, username, icon_data, icon_len, checksum);
+		PurpleBuddyIcon *icon = purple_buddy_icon_new(account, username, icon_data, icon_len, checksum);
 
-			/* purple_buddy_icon_new() calls
-			 * purple_buddy_icon_set_data(), which calls
-			 * purple_buddy_icon_update(), which has the buddy list
-			 * and conversations take references as appropriate.
-			 * This function doesn't return icon, so we can't
-			 * leave a reference dangling. */
-			purple_buddy_icon_unref(icon);
-		}
-		else
-		{
-			/* If the buddy list or a conversation was holding a
-			 * reference, we'd have found the icon in the cache.
-			 * Since we know we're deleting the icon, we only
-			 * need a subset of purple_buddy_icon_update(). */
+		/* purple_buddy_icon_new() calls
+		 * purple_buddy_icon_set_data(), which calls
+		 * purple_buddy_icon_update(), which has the buddy list
+		 * and conversations take references as appropriate.
+		 * This function doesn't return icon, so we can't
+		 * leave a reference dangling. */
+		purple_buddy_icon_unref(icon);
+	}
+	else
+	{
+		/* If the buddy list or a conversation was holding a
+		 * reference, we'd have found the icon in the cache.
+		 * Since we know we're deleting the icon, we only
+		 * need a subset of purple_buddy_icon_update(). */
 
-			GSList *buddies = purple_find_buddies(account, username);
-			while (buddies != NULL)
-			{
-				PurpleBuddy *buddy = (PurpleBuddy *)buddies->data;
+		GSList *buddies = purple_find_buddies(account, username);
+		while (buddies != NULL)
+		{
+			PurpleBuddy *buddy = (PurpleBuddy *)buddies->data;
 
-				unref_filename(purple_blist_node_get_string((PurpleBlistNode *)buddy, "buddy_icon"));
-				purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "buddy_icon");
-				purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "icon_checksum");
+			unref_filename(purple_blist_node_get_string((PurpleBlistNode *)buddy, "buddy_icon"));
+			purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "buddy_icon");
+			purple_blist_node_remove_setting((PurpleBlistNode *)buddy, "icon_checksum");
 
-				buddies = g_slist_delete_link(buddies, buddies);
-			}
-
+			buddies = g_slist_delete_link(buddies, buddies);
 		}
 	}
 }


More information about the Commits mailing list