diff libpurple/buddyicon.c @ 32578:978dd52814c7

propagate from branch 'im.pidgin.pidgin' (head b64b40b3762950d0b8b4bff4f4bb8bddeefc24ac) to branch 'im.pidgin.cpw.qulogic.gtk3' (head 907442ea1932404e6753dbf649de9a5ea2406766)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 09 May 2009 20:10:22 +0000
parents 1a1c12c122c9
children 01f1929d0936
line wrap: on
line diff
--- a/libpurple/buddyicon.c	Sun Apr 19 03:21:27 2009 +0000
+++ b/libpurple/buddyicon.c	Sat May 09 20:10:22 2009 +0000
@@ -753,6 +753,8 @@
 	}
 	unref_filename(old_icon);
 
+	old_img = g_hash_table_lookup(pointer_icon_cache, account);
+
 	if (img)
 		g_hash_table_insert(pointer_icon_cache, account, img);
 	else
@@ -770,7 +772,7 @@
 			prpl_info->set_buddy_icon(gc, img);
 	}
 
-	if ((old_img = g_hash_table_lookup(pointer_icon_cache, account)))
+	if (old_img)
 		purple_imgstore_unref(old_img);
 	else if (old_icon)
 	{