fix yet another tab-label related crash

This commit is contained in:
Matthias Clasen 2007-12-11 19:02:16 +00:00
parent 1d3f9955f0
commit 1add7a0ade
2 changed files with 33 additions and 1 deletions

View File

@ -16,7 +16,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk2
Version: %{base_version}
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: http://download.gnome.org/sources/gtk+/2.12/gtk+-%{version}.tar.bz2
@ -34,6 +34,9 @@ Patch2: workaround.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=488119
Patch3: system-log-crash.patch
# fixed in upstream svn
Patch4: tab-label.patch
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: pango-devel >= %{pango_version}
BuildRequires: glib2-devel >= %{glib2_version}
@ -111,6 +114,7 @@ docs for the GTK+ widget toolkit.
%patch1 -p1 -b .set-invisible-char-to-bullet
%patch2 -p1 -b .workaround
%patch3 -p1 -b .system-log-crash
%patch4 -p1 -b .tab-label
for i in config.guess config.sub ; do
test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i .
@ -294,6 +298,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gtk-2.0
%changelog
* Tue Dec 11 2007 Matthias Clasen <mclasen@redhat.com> - 2.12.3-2
- Fix yet another notebook tab related crash
* Wed Dec 5 2007 Matthias Clasen <mclasen@redhat.com> - 2.12.3-1
- Update to 2.12.3

25
tab-label.patch Normal file
View File

@ -0,0 +1,25 @@
diff -up gtk+-2.12.3/gtk/gtknotebook.c.tab-label gtk+-2.12.3/gtk/gtknotebook.c
--- gtk+-2.12.3/gtk/gtknotebook.c.tab-label 2007-12-11 14:00:13.000000000 -0500
+++ gtk+-2.12.3/gtk/gtknotebook.c 2007-12-11 14:00:34.000000000 -0500
@@ -4349,12 +4349,15 @@ gtk_notebook_real_remove (GtkNotebook *n
gtk_widget_unparent (page->child);
tab_label = page->tab_label;
- g_object_ref (tab_label);
- gtk_notebook_remove_tab_label (notebook, page);
- if (destroying)
- gtk_widget_destroy (tab_label);
- g_object_unref (tab_label);
-
+ if (tab_label)
+ {
+ g_object_ref (tab_label);
+ gtk_notebook_remove_tab_label (notebook, page);
+ if (destroying)
+ gtk_widget_destroy (tab_label);
+ g_object_unref (tab_label);
+ }
+
if (notebook->menu)
{
gtk_container_remove (GTK_CONTAINER (notebook->menu),