[gtk+] treeview: fix a critical warning



commit fd51c8f5e9d6fb68c8e81b9b1e2ab80931f963f0
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Mar 8 17:56:08 2013 -0500

    treeview: fix a critical warning
    
    gtk_tree_view_column_unset_tree_view() resets column->priv->tree_view to
    NULL.
    The function is called when a column is removed, but later from the same
    function we would call _gtk_tree_view_column_unrealize_button(), which
    expects column->priv->tree_view to be != NULL, causing these critical
    warnings
    
    Gtk-CRITICAL **: gtk_widget_unregister_window: assertion
    `GTK_IS_WIDGET (widget)' failed
    
    This commit moves the call to unset the tree view after the button is
    unrealized.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695473

 gtk/gtktreeview.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 505f41b..21873d7 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -11965,8 +11965,6 @@ gtk_tree_view_remove_column (GtkTreeView       *tree_view,
                                         G_CALLBACK (column_sizing_notify),
                                         tree_view);
 
-  _gtk_tree_view_column_unset_tree_view (column);
-
   position = g_list_index (tree_view->priv->columns, column);
 
   tree_view->priv->columns = g_list_remove (tree_view->priv->columns, column);
@@ -11994,7 +11992,7 @@ gtk_tree_view_remove_column (GtkTreeView       *tree_view,
     }
 
   _gtk_tree_view_reset_header_styles (tree_view);
-
+  _gtk_tree_view_column_unset_tree_view (column);
   _gtk_tree_view_accessible_remove_column (tree_view, column, position);
 
   g_object_unref (column);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]