Commit 8831ef2e authored by Ell's avatar Ell

plug-ins: in file-tiff, don't leak image when not saving layers

In file-tiff, when not saving layers, avoid duplicating the image
to create the merged version if it's already been duplicated, and
make sure to delete the duplicated image otherwise.
parent 2da5cb56
......@@ -478,8 +478,13 @@ run (const gchar *name,
gint32 transp;
/* FIXME: Do we have to update drawable, too? */
image = gimp_image_duplicate (image);
if (export != GIMP_EXPORT_EXPORT)
image = gimp_image_duplicate (image);
drawable = gimp_image_get_active_layer (image);
/* borrowed from ./libgimp/gimpexport.c:export_merge()
* this makes sure that the exported file size is correct. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment