[gimp] plug-ins: fix crash at end of JPEG export.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix crash at end of JPEG export.
- Date: Sun, 17 Jan 2021 20:56:04 +0000 (UTC)
commit 823ae50cc57d8c714c212d2324357c252c78808b
Author: Jehan <jehan girinstud io>
Date: Sun Jan 17 21:53:48 2021 +0100
plug-ins: fix crash at end of JPEG export.
Not sure why we didn't see the crash earlier and it suddenly shows up
now. Anyway we must delete the exported image **after** calling
gimp_procedure_config_end_export() on it, obviously.
plug-ins/file-jpeg/jpeg.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c
index e612984f56..478c497738 100644
--- a/plug-ins/file-jpeg/jpeg.c
+++ b/plug-ins/file-jpeg/jpeg.c
@@ -608,6 +608,15 @@ jpeg_save (GimpProcedure *procedure,
}
}
+ if (status == GIMP_PDB_SUCCESS)
+ {
+ if (metadata)
+ gimp_metadata_set_bits_per_sample (metadata, 8);
+ }
+
+ gimp_procedure_config_end_export (config, image, file, status);
+ g_object_unref (config);
+
if (export == GIMP_EXPORT_EXPORT)
{
/* If the image was exported, delete the new display. This also
@@ -621,15 +630,6 @@ jpeg_save (GimpProcedure *procedure,
g_free (drawables);
}
- if (status == GIMP_PDB_SUCCESS)
- {
- if (metadata)
- gimp_metadata_set_bits_per_sample (metadata, 8);
- }
-
- gimp_procedure_config_end_export (config, image, file, status);
- g_object_unref (config);
-
return gimp_procedure_new_return_values (procedure, status, error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]