aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-selection-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-selection-model.c')
-rw-r--r--widgets/misc/e-selection-model.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c
index 5c24d44f49..c44876dab3 100644
--- a/widgets/misc/e-selection-model.c
+++ b/widgets/misc/e-selection-model.c
@@ -558,7 +558,10 @@ move_selection (ESelectionModel *selection,
int col = e_selection_model_cursor_col(selection);
int row_count;
- row = e_sorter_model_to_sorted(selection->sorter, row);
+ /* there is no selected row when row is -1 */
+ if (row != -1)
+ row = e_sorter_model_to_sorted (selection->sorter, row);
+
if (up)
row--;
else