[gimp] Issue #3925 - Gimp from git master segfaults when showing preview of exported JPEG file
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Issue #3925 - Gimp from git master segfaults when showing preview of exported JPEG file
- Date: Thu, 12 Sep 2019 18:06:09 +0000 (UTC)
commit 65530b6aa73bee1855d6e95ba4753b8cffb9370e
Author: Ell <ell_se yahoo com>
Date: Thu Sep 12 21:01:37 2019 +0300
Issue #3925 - Gimp from git master segfaults when showing preview of exported JPEG file
In file-jpeg-save, ref the file object when using a preview idle
to keep it alive.
plug-ins/file-jpeg/jpeg-save.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plug-ins/file-jpeg/jpeg-save.c b/plug-ins/file-jpeg/jpeg-save.c
index 908ef9e6a1..87e967d8cb 100644
--- a/plug-ins/file-jpeg/jpeg-save.c
+++ b/plug-ins/file-jpeg/jpeg-save.c
@@ -223,6 +223,7 @@ background_jpeg_save (PreviewPersistent *pp)
/* we cleanup here (load_image doesn't run in the background) */
g_file_delete (pp->file, NULL, NULL);
+ g_object_unref (pp->file);
g_free (pp);
prev_p = NULL;
@@ -671,7 +672,7 @@ save_image (GFile *file,
pp->buffer = buffer;
pp->format = format;
pp->src = NULL;
- pp->file = file;
+ pp->file = g_object_ref (file);
pp->abort_me = FALSE;
g_warn_if_fail (prev_p == NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]