mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
handle tree == NULL. (Fixes #392259, reported by Christian Persch).
2007-01-05 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_dy_to_top_row): handle tree == NULL. (Fixes #392259, reported by Christian Persch). svn path=/trunk/; revision=17092
This commit is contained in:
parent
5d4ca83c71
commit
d2b57c096a
@ -1,3 +1,8 @@
|
||||
2007-01-05 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_dy_to_top_row): handle tree
|
||||
== NULL. (Fixes #392259, reported by Christian Persch).
|
||||
|
||||
2007-01-05 Kristian Rietveld <kris@gtk.org>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_row_changed): do allow to
|
||||
|
@ -6290,9 +6290,18 @@ gtk_tree_view_dy_to_top_row (GtkTreeView *tree_view)
|
||||
offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
|
||||
tree_view->priv->dy,
|
||||
&tree, &node);
|
||||
path = _gtk_tree_view_find_path (tree_view, tree, node);
|
||||
gtk_tree_view_set_top_row (tree_view, path, offset);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
if (tree == NULL)
|
||||
{
|
||||
tree_view->priv->top_row = NULL;
|
||||
tree_view->priv->top_row_dy = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
path = _gtk_tree_view_find_path (tree_view, tree, node);
|
||||
gtk_tree_view_set_top_row (tree_view, path, offset);
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user