Mercurial > pidgin.yaz
diff libpurple/protocols/null/nullprpl.c @ 25890:9c0337d4b878
Fix the crash/leaks in statusbox
*** Plucked rev 0cb6e54b (darkrain42@pidgin.im):
Look up the old image before we store the new one in the hash table.
Looking up the new image and then unref:ing it (hence freeing the data
and subsequently returning it) is not good. This was causing problems
with changing buddy icons while using mystatusbox. Refs #9120.
*** Plucked rev d25c9ed7 (darkrain42@pidgin.im):
Don't leak image refs in gtkstatusbox and assertion failure in nullprpl
purple_imgstore_new_from_file gives us a ref and
pidgin_status_box_set_buddy_icon also takes a ref.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 06 May 2009 18:58:47 +0000 |
parents | c687fd9c379e |
children | 01f1929d0936 |
line wrap: on
line diff
--- a/libpurple/protocols/null/nullprpl.c Mon May 04 00:12:34 2009 +0000 +++ b/libpurple/protocols/null/nullprpl.c Wed May 06 18:58:47 2009 +0000 @@ -927,7 +927,8 @@ static void nullprpl_set_buddy_icon(PurpleConnection *gc, PurpleStoredImage *img) { purple_debug_info("nullprpl", "setting %s's buddy icon to %s\n", - gc->account->username, purple_imgstore_get_filename(img)); + gc->account->username, + img ? purple_imgstore_get_filename(img) : "(null)"); } static void nullprpl_remove_group(PurpleConnection *gc, PurpleGroup *group) {