diff options
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r-- | widgets/table/e-tree.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 4af1cc2dab..1c45afa7ef 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -555,14 +555,20 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et) break; case '=': case GDK_Right: - path = e_tree_table_adapter_node_at_row(et->priv->etta, row); - e_tree_table_adapter_node_set_expanded (et->priv->etta, path, TRUE); + if (row != -1) { + path = e_tree_table_adapter_node_at_row(et->priv->etta, row); + if (path) + e_tree_table_adapter_node_set_expanded (et->priv->etta, path, TRUE); + } return_val = 1; break; case '-': case GDK_Left: - path = e_tree_table_adapter_node_at_row(et->priv->etta, row); - e_tree_table_adapter_node_set_expanded (et->priv->etta, path, FALSE); + if (row != -1) { + path = e_tree_table_adapter_node_at_row(et->priv->etta, row); + if (path) + e_tree_table_adapter_node_set_expanded (et->priv->etta, path, FALSE); + } return_val = 1; break; default: |