gtk+ r20333 - in trunk: . gtk
- From: kristian svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20333 - in trunk: . gtk
- Date: Sun, 8 Jun 2008 12:47:15 +0000 (UTC)
Author: kristian
Date: Sun Jun 8 12:47:15 2008
New Revision: 20333
URL: http://svn.gnome.org/viewvc/gtk+?rev=20333&view=rev
Log:
2008-06-08 Kristian Rietveld <kris gtk org>
Bug 488119 - critical warnings from gtk_tree_view_get_visible_range
* gtk/gtktreeview.c (gtk_tree_view_get_visible_range): only try to
find path if we found valid nodes, return FALSE otherwise. (Patch
from Matthias Clasen).
Modified:
trunk/ChangeLog
trunk/gtk/gtktreeview.c
Modified: trunk/gtk/gtktreeview.c
==============================================================================
--- trunk/gtk/gtktreeview.c (original)
+++ trunk/gtk/gtktreeview.c Sun Jun 8 12:47:15 2008
@@ -13237,18 +13237,24 @@
{
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 (node)
+ *start_path = _gtk_tree_view_find_path (tree_view, tree, node);
+ else
+ retval = FALSE;
}
if (end_path)
@@ -13261,10 +13267,13 @@
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 (node)
+ *end_path = _gtk_tree_view_find_path (tree_view, tree, node);
+ else
+ retval = FALSE;
}
- return TRUE;
+ return retval;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]