if (w <= max_w && h <= max_h)
{
- gdk_pixbuf_ref(src);
+ g_object_ref ( G_OBJECT ( src ) );
return src;
}
else
GdkPixbuf *image, *tmpbuf;
image = gdk_pixbuf_new_from_file(path, NULL);
+ if (!image)
+ return NULL;
+
tmpbuf = gdk_pixbuf_apply_embedded_orientation(image);
g_object_unref(G_OBJECT(image));
image = tmpbuf;
if (image)
{
GdkPixbuf *thumb = save_thumbnail(path, image);
- gdk_pixbuf_unref ( image );
+ g_object_unref ( G_OBJECT ( image ) );
return thumb;
}
goto out;
err:
if (thumb)
- gdk_pixbuf_unref(thumb);
+ g_object_unref ( G_OBJECT ( thumb ) );
thumb = NULL;
out:
g_free(path);