aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-table/e-tree-model.c4
-rw-r--r--widgets/table/e-tree-model.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/widgets/e-table/e-tree-model.c b/widgets/e-table/e-tree-model.c
index 40e54a1667..e8685a8dc8 100644
--- a/widgets/e-table/e-tree-model.c
+++ b/widgets/e-table/e-tree-model.c
@@ -199,9 +199,9 @@ etree_set_expanded_recurse (ETreeModel *etm, ETreePath* node, gboolean expanded)
static ETreePath *
etree_node_at_row (ETreeModel *etree, int row)
{
- GNode *node = g_array_index (etree->row_array, GNode*, row);
+ g_return_val_if_fail (row < etree->row_array->len, NULL);
- return node;
+ return g_array_index (etree->row_array, GNode*, row);
}
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 40e54a1667..e8685a8dc8 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -199,9 +199,9 @@ etree_set_expanded_recurse (ETreeModel *etm, ETreePath* node, gboolean expanded)
static ETreePath *
etree_node_at_row (ETreeModel *etree, int row)
{
- GNode *node = g_array_index (etree->row_array, GNode*, row);
+ g_return_val_if_fail (row < etree->row_array->len, NULL);
- return node;
+ return g_array_index (etree->row_array, GNode*, row);
}