changeset 16644:174d73c90036

Only attempt to ref the statusbox icon image if it's actually set
author Mark Doliner <mark@kingant.net>
date Sun, 29 Apr 2007 08:13:21 +0000
parents 8ef2d30bc1bf
children 6765a4cbea0b
files pidgin/gtkstatusbox.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkstatusbox.c	Sun Apr 29 07:40:40 2007 +0000
+++ b/pidgin/gtkstatusbox.c	Sun Apr 29 08:13:21 2007 +0000
@@ -2071,7 +2071,9 @@
 pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, PurpleStoredImage *img)
 {
 	purple_imgstore_unref(status_box->buddy_icon_img);
-	status_box->buddy_icon_img = purple_imgstore_ref(img);
+	status_box->buddy_icon_img = img;
+	if (status_box->buddy_icon_img != NULL)
+		purple_imgstore_ref(status_box->buddy_icon_img);
 
 	pidgin_status_box_redisplay_buddy_icon(status_box);
 }