From 27b5e5cbc5517702d5660e2120013aa80ed6f97b Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 27 Jul 2009 11:46:43 +0200 Subject: [PATCH] Prevent var sheet from traversing to an invalid cell --- src/ui/gui/psppire-var-sheet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/gui/psppire-var-sheet.c b/src/ui/gui/psppire-var-sheet.c index a4f082cc..70e1044f 100644 --- a/src/ui/gui/psppire-var-sheet.c +++ b/src/ui/gui/psppire-var-sheet.c @@ -251,6 +251,9 @@ traverse_cell_callback (PsppireSheet *sheet, gint n_vars = psppire_var_store_get_var_cnt (var_store); + if (new_cell->col >= PSPPIRE_VAR_STORE_n_COLS) + return TRUE; + if (new_cell->row >= n_vars && !var_sheet->may_create_vars) return TRUE; -- 2.30.2