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:
Kristian Rietveld 2007-01-05 22:14:08 +00:00 committed by Kristian Rietveld
parent 5d4ca83c71
commit d2b57c096a
2 changed files with 17 additions and 3 deletions

View File

@ -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

View File

@ -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);
}
}
}