From 2a702dcd42be89e44fe85f74cb7727d661438aa7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 10 Dec 2007 06:19:53 +0000 Subject: Another fix to avoid further fallout from the fix for bug 388321. 2007-12-10 Matthias Clasen * gtk/gtknotebook.c (gtk_notebook_real_remove): Another fix to avoid further fallout from the fix for bug 388321. svn path=/trunk/; revision=19139 --- ChangeLog | 5 +++++ gtk/gtknotebook.c | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27ab377642..a2acf30e7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-10 Matthias Clasen + + * gtk/gtknotebook.c (gtk_notebook_real_remove): Another fix + to avoid further fallout from the fix for bug 388321. + 2007-12-09 09:56:06 Attilio Fiandrotti * gdk/directfb/gdkgc-directfb.c: diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 55acbf5b99..80e18fdba5 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4349,12 +4349,15 @@ gtk_notebook_real_remove (GtkNotebook *notebook, 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), -- cgit v1.2.1