summaryrefslogtreecommitdiff
path: root/gtk/gtknotebook.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-04-12 21:52:16 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-04-12 21:52:16 +0000
commitc652859042c1ae55469eb69fb22b4647147cd30f (patch)
tree9a07372d042f7e14ac7f52d6e78cad7a9c7f3bfd /gtk/gtknotebook.c
parent8e84c6b9d25bd2a40dc12ce69373e2d305ae085d (diff)
downloadgdk-pixbuf-c652859042c1ae55469eb69fb22b4647147cd30f.tar.gz
relocate the remove_weak_pointer to just before we free the page, to be
2002-04-12 Havoc Pennington <hp@redhat.com> * gtk/gtknotebook.c (gtk_notebook_real_remove): relocate the remove_weak_pointer to just before we free the page, to be sure it doesn't get re-added. #75282
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r--gtk/gtknotebook.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index bce6cad25..3f933700f 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2387,12 +2387,6 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
gtk_notebook_switch_focus_tab (notebook, next_list);
page = list->data;
-
- if (page->last_focus_child)
- {
- g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
- page->last_focus_child = NULL;
- }
if (GTK_WIDGET_VISIBLE (page->child) && GTK_WIDGET_VISIBLE (notebook))
need_resize = TRUE;
@@ -2412,6 +2406,13 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
notebook->children = g_list_remove_link (notebook->children, list);
g_list_free (list);
+
+ if (page->last_focus_child)
+ {
+ g_object_remove_weak_pointer (G_OBJECT (page->last_focus_child), (gpointer *)&page->last_focus_child);
+ page->last_focus_child = NULL;
+ }
+
g_free (page);
if (!notebook->children && notebook->show_tabs &&