diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c index 49d6503230..9564355f4f 100644 --- a/plug-ins/common/file-heif.c +++ b/plug-ins/common/file-heif.c @@ -362,6 +362,9 @@ run (const gchar *name, g_object_unref (file); } + if (export == GIMP_EXPORT_EXPORT) + gimp_image_delete (image_ID); + g_clear_object (&metadata); } #if LIBHEIF_HAVE_VERSION(1,8,0) @@ -448,6 +451,9 @@ run (const gchar *name, g_object_unref (file); } + if (export == GIMP_EXPORT_EXPORT) + gimp_image_delete (image_ID); + g_clear_object (&metadata); } #endif