Cannot unref pixbufs obtained through mime_icons() just yet

This commit is contained in:
Pierre Pronchery 2012-12-06 19:06:56 +01:00
parent 90479498c1
commit 67323ef4da

View File

@ -90,9 +90,7 @@ static GdkPixbuf * _mime_icon_emblem(GdkPixbuf * pixbuf, int size,
int flags = GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_FORCE_SIZE;
/* work on a copy */
epixbuf = gdk_pixbuf_copy(pixbuf);
gdk_pixbuf_unref(pixbuf);
pixbuf = epixbuf;
pixbuf = gdk_pixbuf_copy(pixbuf);
/* determine the size of the emblem */
switch(size)
{
@ -123,7 +121,7 @@ static GdkPixbuf * _mime_icon_emblem(GdkPixbuf * pixbuf, int size,
gdk_pixbuf_composite(epixbuf, pixbuf, 0, 0, esize, esize, 0, 0,
1.0, 1.0, GDK_INTERP_NEAREST, 255);
#endif
gdk_pixbuf_unref(epixbuf);
g_object_unref(epixbuf);
return pixbuf;
}