47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
diff -up gtk+-2.12.1/gtk/gtktreeview.c.system-log gtk+-2.12.1/gtk/gtktreeview.c
|
|
--- gtk+-2.12.1/gtk/gtktreeview.c.system-log 2007-10-18 21:51:23.000000000 -0400
|
|
+++ gtk+-2.12.1/gtk/gtktreeview.c 2007-10-18 21:53:18.000000000 -0400
|
|
@@ -13276,18 +13276,24 @@ gtk_tree_view_get_visible_range (GtkTree
|
|
{
|
|
GtkRBTree *tree;
|
|
GtkRBNode *node;
|
|
-
|
|
+ gboolean retval;
|
|
+
|
|
g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE);
|
|
|
|
if (!tree_view->priv->tree)
|
|
return FALSE;
|
|
|
|
+ retval = TRUE;
|
|
+
|
|
if (start_path)
|
|
{
|
|
_gtk_rbtree_find_offset (tree_view->priv->tree,
|
|
TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, 0),
|
|
&tree, &node);
|
|
- *start_path = _gtk_tree_view_find_path (tree_view, tree, node);
|
|
+ if (tree)
|
|
+ *start_path = _gtk_tree_view_find_path (tree_view, tree, node);
|
|
+ else
|
|
+ retval = FALSE;
|
|
}
|
|
|
|
if (end_path)
|
|
@@ -13300,10 +13306,13 @@ gtk_tree_view_get_visible_range (GtkTree
|
|
y = TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, tree_view->priv->vadjustment->page_size) - 1;
|
|
|
|
_gtk_rbtree_find_offset (tree_view->priv->tree, y, &tree, &node);
|
|
- *end_path = _gtk_tree_view_find_path (tree_view, tree, node);
|
|
+ if (tree)
|
|
+ *end_path = _gtk_tree_view_find_path (tree_view, tree, node);
|
|
+ else
|
|
+ retval = FALSE;
|
|
}
|
|
|
|
- return TRUE;
|
|
+ return retval;
|
|
}
|
|
|
|
static void
|