Prevent var sheet from traversing to an invalid cell
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 27 Jul 2009 09:46:43 +0000 (11:46 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 27 Jul 2009 09:46:43 +0000 (11:46 +0200)
src/ui/gui/psppire-var-sheet.c

index a4f082cca50bddb354b2559ce725896ba9c8c4fe..70e1044fcb25ed9d46dbc2fcc8d2232c3687fda6 100644 (file)
@@ -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;