85 lines
2.6 KiB
Diff
85 lines
2.6 KiB
Diff
From e73e5fc5b905db79d99f1fa1b5b74820503d8b05 Mon Sep 17 00:00:00 2001
|
|
From: Nils Philippsen <nils@redhat.com>
|
|
Date: Fri, 17 Jul 2015 17:26:03 +0200
|
|
Subject: [PATCH] patch: export-dialog-destroyed-crash
|
|
|
|
Squashed commit of the following:
|
|
|
|
commit e9d47909528e6364311b2666e3a8cbc60a05957f
|
|
Author: Nils Philippsen <nils@redhat.com>
|
|
Date: Fri Jul 17 17:07:18 2015 +0200
|
|
|
|
Ref/unref dialog->image around saving as well...
|
|
|
|
...to avoid warnings that happen if the image got closed before the
|
|
saving finishes.
|
|
|
|
(amends commit a0e48ad29e93e2dc259879abeb2dedc9a420b8f6)
|
|
|
|
(cherry picked from commit 0b900239d57161da11e3e0c8094552cf1480dcd3)
|
|
|
|
commit 269b9574ea983c173c89110fbc8d9e73de513c80
|
|
Author: Michael Natterer <mitch@gimp.org>
|
|
Date: Tue Jul 14 13:22:06 2015 +0200
|
|
|
|
Bug 739003 - Crashes in file_save_dialog_response()
|
|
|
|
Ref/unref the dialog around saving the image insatead of connecting to
|
|
"destroy" and NULLifying the local dialog variable on destruction,
|
|
which has caused weird crashes on fedora.
|
|
|
|
(cherry picked from commit a0e48ad29e93e2dc259879abeb2dedc9a420b8f6)
|
|
---
|
|
app/dialogs/file-save-dialog.c | 14 +++++---------
|
|
1 file changed, 5 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c
|
|
index 8b0873f..e8a3d95 100644
|
|
--- a/app/dialogs/file-save-dialog.c
|
|
+++ b/app/dialogs/file-save-dialog.c
|
|
@@ -160,7 +160,6 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|
gchar *uri;
|
|
gchar *basename;
|
|
GimpPlugInProcedure *save_proc;
|
|
- gulong handler_id;
|
|
|
|
if (! dialog->export)
|
|
{
|
|
@@ -183,9 +182,8 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|
return;
|
|
}
|
|
|
|
- handler_id = g_signal_connect (dialog, "destroy",
|
|
- G_CALLBACK (gtk_widget_destroyed),
|
|
- &dialog);
|
|
+ g_object_ref (dialog);
|
|
+ g_object_ref (dialog->image);
|
|
|
|
switch (file_save_dialog_check_uri (save_dialog, gimp,
|
|
&uri, &basename, &save_proc))
|
|
@@ -245,9 +243,7 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|
g_free (uri);
|
|
g_free (basename);
|
|
|
|
- if (dialog)
|
|
- gimp_file_dialog_set_sensitive (dialog, TRUE);
|
|
-
|
|
+ gimp_file_dialog_set_sensitive (dialog, TRUE);
|
|
break;
|
|
|
|
case CHECK_URI_SWITCH_DIALOGS:
|
|
@@ -259,8 +255,8 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|
break;
|
|
}
|
|
|
|
- if (dialog)
|
|
- g_signal_handler_disconnect (dialog, handler_id);
|
|
+ g_object_unref (dialog->image);
|
|
+ g_object_unref (dialog);
|
|
}
|
|
|
|
/* IMPORTANT: When changing this function, keep
|
|
--
|
|
2.4.3
|
|
|