don't crash upon deleting tags in popup (#919795)
This commit is contained in:
parent
f7a9d92b54
commit
4e17aa14c5
50
gimp-2.8.4-tag-popup-crash.patch
Normal file
50
gimp-2.8.4-tag-popup-crash.patch
Normal file
@ -0,0 +1,50 @@
|
||||
From e777d620374a5d3664064f535001ea5d57fcf639 Mon Sep 17 00:00:00 2001
|
||||
From: Nils Philippsen <nils@redhat.com>
|
||||
Date: Sat, 20 Apr 2013 14:25:29 +0200
|
||||
Subject: [PATCH] patch: tag-popup-crash
|
||||
|
||||
Squashed commit of the following:
|
||||
|
||||
commit fd4fc76e2114b8ab9341232912c2d19b6160ccd6
|
||||
Author: Nils Philippsen <nils@redhat.com>
|
||||
Date: Tue Apr 16 11:16:41 2013 +0200
|
||||
|
||||
app: let the tag popup own its tag objects
|
||||
|
||||
This should fix crashes in which tag objects got accessed after they
|
||||
were disposed, because they still were stored with the popup object.
|
||||
(cherry picked from commit b109e0580650b4b49b6f00b15fec4bcd330fb045)
|
||||
---
|
||||
app/widgets/gimptagpopup.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/app/widgets/gimptagpopup.c b/app/widgets/gimptagpopup.c
|
||||
index f822ab2..fd913c2 100644
|
||||
--- a/app/widgets/gimptagpopup.c
|
||||
+++ b/app/widgets/gimptagpopup.c
|
||||
@@ -257,6 +257,8 @@ gimp_tag_popup_constructed (GObject *object)
|
||||
tag_data->tag = tag_iterator->data;
|
||||
tag_data->state = GTK_STATE_NORMAL;
|
||||
|
||||
+ g_object_ref (tag_data->tag);
|
||||
+
|
||||
for (j = 0; j < current_count; j++)
|
||||
{
|
||||
if (! gimp_tag_compare_with_string (tag_data->tag, current_tags[j]))
|
||||
@@ -386,6 +388,13 @@ gimp_tag_popup_dispose (GObject *object)
|
||||
|
||||
if (popup->tag_data)
|
||||
{
|
||||
+ gint i;
|
||||
+
|
||||
+ for (i = 0; i < popup->tag_count; i++)
|
||||
+ {
|
||||
+ g_object_unref (popup->tag_data[i].tag);
|
||||
+ }
|
||||
+
|
||||
g_free (popup->tag_data);
|
||||
popup->tag_data = NULL;
|
||||
}
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -80,7 +80,7 @@ Summary: GNU Image Manipulation Program
|
||||
Name: gimp
|
||||
Epoch: 2
|
||||
Version: 2.8.4
|
||||
Release: %{?prerelprefix}2%{dotprerel}%{dotgitrev}%{?dist}
|
||||
Release: %{?prerelprefix}3%{dotprerel}%{dotgitrev}%{?dist}
|
||||
|
||||
# Compute some version related macros
|
||||
# Ugly hack, you need to get your quoting backslashes/percent signs straight
|
||||
@ -209,6 +209,9 @@ Patch2: gimp-2.8.4-strict-overflow-warning.patch
|
||||
# Don't have duplicate mime types in desktop file.
|
||||
# Upstream commit 0ed3b482a422ff684c8921b7de9f44ea7b20345c.
|
||||
Patch3: gimp-2.8.4-mime-types.patch
|
||||
# Fix crashes when deleting tags in popups.
|
||||
# Upstream commit fd4fc76e2114b8ab9341232912c2d19b6160ccd6.
|
||||
Patch4: gimp-2.8.4-tag-popup-crash.patch
|
||||
|
||||
%description
|
||||
GIMP (GNU Image Manipulation Program) is a powerful image composition and
|
||||
@ -297,6 +300,7 @@ EOF
|
||||
%patch1 -p1 -b .cm-system-monitor-profile-by-default
|
||||
%patch2 -p1 -b .strict-overflow-warning
|
||||
%patch3 -p1 -b .mime-types
|
||||
%patch4 -p1 -b .tag-popup-crash
|
||||
|
||||
%build
|
||||
%if %{with hardening}
|
||||
@ -591,6 +595,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Apr 20 2013 Nils Philippsen <nils@redhat.com> - 2:2.8.4-3
|
||||
- don't crash upon deleting tags in popup (#919795)
|
||||
|
||||
* Wed Mar 06 2013 Nils Philippsen <nils@redhat.com> - 2:2.8.4-2
|
||||
- get rid of strict overflow warning
|
||||
- don't have duplicate mime types in desktop file
|
||||
|
Loading…
Reference in New Issue
Block a user