From bc5dfe106d15f2e82b1038a24e53ab646c6e62cc Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 24 Jan 2002 16:54:54 +0000 Subject: [PATCH] Don't clear the model until we clean up all the other objects that might Thu Jan 24 11:53:19 2002 Owen Taylor * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear the model until we clean up all the other objects that might refer to the object. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtktreeview.c | 11 +++-------- 8 files changed, 45 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30182b6ee5..b2ae24354f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Jan 24 11:53:19 2002 Owen Taylor + + * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear + the model until we clean up all the other objects + that might refer to the object. + 2002-01-24 Mark McLoughlin * gtk/gtkaccessible.h: include gtk/gtkwidget.h diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 30182b6ee5..b2ae24354f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Thu Jan 24 11:53:19 2002 Owen Taylor + + * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear + the model until we clean up all the other objects + that might refer to the object. + 2002-01-24 Mark McLoughlin * gtk/gtkaccessible.h: include gtk/gtkwidget.h diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 30182b6ee5..b2ae24354f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Thu Jan 24 11:53:19 2002 Owen Taylor + + * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear + the model until we clean up all the other objects + that might refer to the object. + 2002-01-24 Mark McLoughlin * gtk/gtkaccessible.h: include gtk/gtkwidget.h diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 30182b6ee5..b2ae24354f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Thu Jan 24 11:53:19 2002 Owen Taylor + + * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear + the model until we clean up all the other objects + that might refer to the object. + 2002-01-24 Mark McLoughlin * gtk/gtkaccessible.h: include gtk/gtkwidget.h diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 30182b6ee5..b2ae24354f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Thu Jan 24 11:53:19 2002 Owen Taylor + + * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear + the model until we clean up all the other objects + that might refer to the object. + 2002-01-24 Mark McLoughlin * gtk/gtkaccessible.h: include gtk/gtkwidget.h diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 30182b6ee5..b2ae24354f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Thu Jan 24 11:53:19 2002 Owen Taylor + + * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear + the model until we clean up all the other objects + that might refer to the object. + 2002-01-24 Mark McLoughlin * gtk/gtkaccessible.h: include gtk/gtkwidget.h diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 30182b6ee5..b2ae24354f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Thu Jan 24 11:53:19 2002 Owen Taylor + + * gtk/gtktreeview.c (gtk_tree_view_destroy): Don't clear + the model until we clean up all the other objects + that might refer to the object. + 2002-01-24 Mark McLoughlin * gtk/gtkaccessible.h: include gtk/gtkwidget.h diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index c5191de298..54447d58f5 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -1050,8 +1050,6 @@ gtk_tree_view_destroy (GtkObject *object) tree_view->priv->columns = NULL; } - gtk_tree_view_set_model (tree_view, NULL); - if (tree_view->priv->tree != NULL) { gtk_tree_view_unref_and_check_selection_tree (tree_view, tree_view->priv->tree); @@ -1059,12 +1057,6 @@ gtk_tree_view_destroy (GtkObject *object) tree_view->priv->tree = NULL; } - if (tree_view->priv->model != NULL) - { - g_object_unref (G_OBJECT (tree_view->priv->model)); - tree_view->priv->model = NULL; - } - if (tree_view->priv->selection != NULL) { _gtk_tree_selection_set_tree_view (tree_view->priv->selection, NULL); @@ -1122,6 +1114,9 @@ gtk_tree_view_destroy (GtkObject *object) (* tree_view->priv->search_destroy) (tree_view->priv->search_user_data); tree_view->priv->search_user_data = NULL; } + + gtk_tree_view_set_model (tree_view, NULL); + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); }