changeset 16868:a1858493abe2

Fix a reference counting bug.
author Richard Laager <rlaager@wiktel.com>
date Fri, 04 May 2007 04:51:19 +0000
parents 680b5910933b
children a7bf14cee439 c9e574921316 f8661755b4b5
files libpurple/buddyicon.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/buddyicon.c	Fri May 04 04:34:48 2007 +0000
+++ b/libpurple/buddyicon.c	Fri May 04 04:51:19 2007 +0000
@@ -279,6 +279,7 @@
 	icon->account = account;
 	icon->username = g_strdup(username);
 	icon->checksum = NULL;
+	icon->ref_count = 1;
 
 	icon_cache = g_hash_table_lookup(account_cache, account);
 
@@ -653,7 +654,6 @@
 				const char *checksum;
 
 				icon = purple_buddy_icon_create(account, username);
-				icon->ref_count = 0;
 				icon->img = NULL;
 				checksum = purple_blist_node_get_string((PurpleBlistNode*)b, "icon_checksum");
 				purple_buddy_icon_set_data(icon, data, len, checksum);