avoid a crash
This commit is contained in:
parent
f4771315d2
commit
26124126d1
31
0001-pixbuf-engine-Avoid-a-crash-if-widget-is-NULL.patch
Normal file
31
0001-pixbuf-engine-Avoid-a-crash-if-widget-is-NULL.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 1d0e2d58385bd01fdb753bf40ba2f4c32ccd0cc8 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Clasen <mclasen@redhat.com>
|
||||
Date: Mon, 29 Sep 2014 16:05:57 -0400
|
||||
Subject: [PATCH] pixbuf engine: Avoid a crash if widget is NULL
|
||||
|
||||
Commit 85f2a721cf introduced an unconditional call to
|
||||
gtk_widget_get_direction(). This does not work for 'foreign'
|
||||
uses of the theme engine, e.g. in Qt, where widget is NULL.
|
||||
|
||||
This was reported as a crash in Fedora here:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=924683
|
||||
---
|
||||
modules/engines/pixbuf/pixbuf-draw.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/engines/pixbuf/pixbuf-draw.c b/modules/engines/pixbuf/pixbuf-draw.c
|
||||
index 9239bd1..5448d81 100644
|
||||
--- a/modules/engines/pixbuf/pixbuf-draw.c
|
||||
+++ b/modules/engines/pixbuf/pixbuf-draw.c
|
||||
@@ -131,7 +131,7 @@ draw_simple_image(GtkStyle *style,
|
||||
match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||
}
|
||||
|
||||
- if (!(match_data->flags & THEME_MATCH_DIRECTION))
|
||||
+ if (widget && !(match_data->flags & THEME_MATCH_DIRECTION))
|
||||
{
|
||||
match_data->flags |= THEME_MATCH_DIRECTION;
|
||||
match_data->direction = gtk_widget_get_direction (widget);
|
||||
--
|
||||
2.1.0
|
||||
|
@ -18,7 +18,7 @@
|
||||
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
|
||||
Name: gtk2
|
||||
Version: 2.24.24
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.gtk.org
|
||||
@ -36,6 +36,8 @@ Patch8: tooltip-positioning.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=611313
|
||||
Patch15: window-dragging.patch
|
||||
Patch16: 0001-threads-Do-not-release-the-GDK-lock-if-it-hasn-t-bee.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=924683
|
||||
Patch17: 0001-pixbuf-engine-Avoid-a-crash-if-widget-is-NULL.patch
|
||||
|
||||
BuildRequires: atk-devel >= %{atk_version}
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
@ -148,6 +150,7 @@ This package contains developer documentation for the GTK+ widget toolkit.
|
||||
%patch8 -p1 -b .tooltip-positioning
|
||||
%patch15 -p1 -b .window-dragging
|
||||
%patch16 -p1 -b .trylock
|
||||
%patch17 -p1 -b .qtcrash
|
||||
|
||||
%build
|
||||
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
|
||||
@ -337,6 +340,9 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
|
||||
%doc tmpdocs/examples
|
||||
|
||||
%changelog
|
||||
* Mon Sep 29 2014 Matthias Clasen <mclasen@redhat.com> - 2.24.24-4
|
||||
- Avoid a crash in the pixbuf engine when used from Qt
|
||||
|
||||
* Thu Sep 04 2014 Kalev Lember <kalevlember@gmail.com> - 2.24.24-3
|
||||
- Do not abort when releasing an unlocked mutex (#1138146)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user