diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-07 11:00:52 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-07 11:00:52 +0800 |
commit | d692cab641aa76330247a2991ee8e510fc1bf75d (patch) | |
tree | 24a32afcf8aea23c32aa59f7624de545037bfe32 | |
parent | 3b62a242bf8ff7e5542bedc42112587840f780e4 (diff) | |
download | gsoc2013-evolution-d692cab641aa76330247a2991ee8e510fc1bf75d.tar.gz gsoc2013-evolution-d692cab641aa76330247a2991ee8e510fc1bf75d.tar.zst gsoc2013-evolution-d692cab641aa76330247a2991ee8e510fc1bf75d.zip |
add a g_return_val_if_fail to etree_node_at_row
svn path=/trunk/; revision=3937
-rw-r--r-- | widgets/e-table/e-tree-model.c | 4 | ||||
-rw-r--r-- | widgets/table/e-tree-model.c | 4 |
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); } |