Mercurial > pidgin.yaz
diff pidgin/gtkblist.c @ 16381:72dc611f3257
Fix the custom icon stuff, and various memory leaks. At this point, custom
icons work properly, EXCEPT FOR A SERIOUS LEAK which I haven't fixed yet
because I'm seeing weird memory allocation issues. Once I deal with that, it's
just the account icon stuff that's left.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 24 Apr 2007 17:00:22 +0000 |
parents | 391a79778f89 |
children | 05033ae856b2 |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Tue Apr 24 16:20:01 2007 +0000 +++ b/pidgin/gtkblist.c Tue Apr 24 17:00:22 2007 +0000 @@ -2204,6 +2204,8 @@ if (!(icon = purple_buddy_icons_find(buddy->account, buddy->name))) /* Not sure I like this...*/ return NULL; data = purple_buddy_icon_get_data(icon, &len); + if (data == NULL) + return NULL; } } @@ -2213,14 +2215,14 @@ loader = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write(loader, data, len, NULL); gdk_pixbuf_loader_close(loader, NULL); - - purple_imgstore_unref(custom_img); - buf = gdk_pixbuf_loader_get_pixbuf(loader); if (buf) g_object_ref(G_OBJECT(buf)); g_object_unref(G_OBJECT(loader)); + // TODO: FIX THIS!!! + //purple_imgstore_unref(custom_img); + if (buf) { int orig_width, orig_height; int scale_width, scale_height;