export-dialog-destroyed-crash patch: avoid subsequent warnings
This commit is contained in:
parent
a4bc69f98f
commit
e4bb352032
@ -1,69 +1,38 @@
|
|||||||
From 10f0f825bc5e0ec67a7b568faa9d444b8f26629d Mon Sep 17 00:00:00 2001
|
From 1fc061aa469c1a70288907bbb02c371fc0c1f4d3 Mon Sep 17 00:00:00 2001
|
||||||
From: Nils Philippsen <nils@redhat.com>
|
From: Nils Philippsen <nils@redhat.com>
|
||||||
Date: Tue, 14 Jul 2015 17:46:27 +0200
|
Date: Fri, 17 Jul 2015 17:07:18 +0200
|
||||||
Subject: [PATCH] patch: export-dialog-destroyed-crash
|
Subject: [PATCH] Ref/unref dialog->image around saving as well...
|
||||||
|
|
||||||
Squashed commit of the following:
|
...to avoid warnings that happen if the image got closed before the
|
||||||
|
saving finishes.
|
||||||
|
|
||||||
commit 269b9574ea983c173c89110fbc8d9e73de513c80
|
(amends commit a0e48ad29e93e2dc259879abeb2dedc9a420b8f6)
|
||||||
Author: Michael Natterer <mitch@gimp.org>
|
|
||||||
Date: Tue Jul 14 13:22:06 2015 +0200
|
|
||||||
|
|
||||||
Bug 739003 - Crashes in file_save_dialog_response()
|
(cherry picked from commit 0b900239d57161da11e3e0c8094552cf1480dcd3)
|
||||||
|
|
||||||
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 | 12 +++---------
|
app/dialogs/file-save-dialog.c | 2 ++
|
||||||
1 file changed, 3 insertions(+), 9 deletions(-)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c
|
diff --git a/app/dialogs/file-save-dialog.c b/app/dialogs/file-save-dialog.c
|
||||||
index 8b0873f..b5f3093 100644
|
index b5f3093..e8a3d95 100644
|
||||||
--- a/app/dialogs/file-save-dialog.c
|
--- a/app/dialogs/file-save-dialog.c
|
||||||
+++ b/app/dialogs/file-save-dialog.c
|
+++ b/app/dialogs/file-save-dialog.c
|
||||||
@@ -160,7 +160,6 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
@@ -183,6 +183,7 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
||||||
gchar *uri;
|
|
||||||
gchar *basename;
|
|
||||||
GimpPlugInProcedure *save_proc;
|
|
||||||
- gulong handler_id;
|
|
||||||
|
|
||||||
if (! dialog->export)
|
|
||||||
{
|
|
||||||
@@ -183,9 +182,7 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- handler_id = g_signal_connect (dialog, "destroy",
|
g_object_ref (dialog);
|
||||||
- G_CALLBACK (gtk_widget_destroyed),
|
+ g_object_ref (dialog->image);
|
||||||
- &dialog);
|
|
||||||
+ g_object_ref (dialog);
|
|
||||||
|
|
||||||
switch (file_save_dialog_check_uri (save_dialog, gimp,
|
switch (file_save_dialog_check_uri (save_dialog, gimp,
|
||||||
&uri, &basename, &save_proc))
|
&uri, &basename, &save_proc))
|
||||||
@@ -245,9 +242,7 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
@@ -254,6 +255,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 +254,7 @@ file_save_dialog_response (GtkWidget *save_dialog,
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (dialog)
|
+ g_object_unref (dialog->image);
|
||||||
- g_signal_handler_disconnect (dialog, handler_id);
|
g_object_unref (dialog);
|
||||||
+ g_object_unref (dialog);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IMPORTANT: When changing this function, keep
|
|
||||||
--
|
--
|
||||||
2.4.3
|
2.4.3
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ Summary: GNU Image Manipulation Program
|
|||||||
Name: gimp
|
Name: gimp
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Version: 2.8.14
|
Version: 2.8.14
|
||||||
Release: %{?prerelprefix}2%{dotprerel}%{dotgitrev}%{?dist}
|
Release: %{?prerelprefix}3%{dotprerel}%{dotgitrev}%{?dist}
|
||||||
|
|
||||||
# Compute some version related macros.
|
# Compute some version related macros.
|
||||||
# Ugly, need to get quoting percent signs straight.
|
# Ugly, need to get quoting percent signs straight.
|
||||||
@ -668,6 +668,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 17 2015 Nils Philippsen <nils@redhat.com> - 2:2.8.14-3
|
||||||
|
- export-dialog-destroyed-crash patch: avoid subsequent warnings
|
||||||
|
|
||||||
* Thu Jul 16 2015 Nils Philippsen <nils@redhat.com> - 2:2.8.14-2
|
* Thu Jul 16 2015 Nils Philippsen <nils@redhat.com> - 2:2.8.14-2
|
||||||
- fix linking problem
|
- fix linking problem
|
||||||
- use %%buildroot macro consistently again
|
- use %%buildroot macro consistently again
|
||||||
|
Loading…
Reference in New Issue
Block a user