pidgin.custom_smiley: a8b2fa0c: A leak fix from malu. Thanks!

sadrul at pidgin.im sadrul at pidgin.im
Wed May 7 14:26:01 EDT 2008


-----------------------------------------------------------------
Revision: a8b2fa0cbd83a72185095c1dc987c125e6178f7a
Ancestor: 36cd05a9f41bff52a2f943c0cd2d3c0b66e02e4a
Author: sadrul at pidgin.im
Date: 2008-05-07T18:22:49
Branch: im.pidgin.pidgin.custom_smiley
URL: http://d.pidgin.im/viewmtn/revision/info/a8b2fa0cbd83a72185095c1dc987c125e6178f7a

Modified files:
        pidgin/gtkimhtmltoolbar.c

ChangeLog: 

A leak fix from malu. Thanks!

-------------- next part --------------
============================================================
--- pidgin/gtkimhtmltoolbar.c	37b13dfe5266b9d261562199cb034b01c9704636
+++ pidgin/gtkimhtmltoolbar.c	38b53bbe5a05e56587bf1e66798f4e96a6c78aec
@@ -648,10 +648,9 @@ sort_smileys(struct smiley_button_list *
 			GdkPixbuf *resized;
 			resized = gdk_pixbuf_scale_simple(pixbuf, 24, 24,
 					GDK_INTERP_HYPER);
-			image = gtk_image_new_from_pixbuf(resized);
 
+			gtk_image_set_from_pixbuf(GTK_IMAGE(image), resized); /* This unrefs pixbuf */
 			gtk_widget_size_request(image, &size);
-			g_object_unref(G_OBJECT(pixbuf));
 			g_object_unref(G_OBJECT(resized));
 		}
 	}


More information about the Commits mailing list