X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-variable-sheet.c;h=32d163f66578a579f16e33a6f9be5ba4fb091041;hb=3e7375959ad4c954b165a0b367657702bfaf70fc;hp=35ee7d6085d636083ae072f99be88ce8654bb799;hpb=ed7a8820e2f7797fb61a9a5628c18169dcfd3513;p=pspp diff --git a/src/ui/gui/psppire-variable-sheet.c b/src/ui/gui/psppire-variable-sheet.c index 35ee7d6085..32d163f665 100644 --- a/src/ui/gui/psppire-variable-sheet.c +++ b/src/ui/gui/psppire-variable-sheet.c @@ -305,6 +305,10 @@ change_var_property (PsppireVariableSheet *var_sheet, gint col, gint row, const PsppireDict *dict = NULL; g_object_get (var_sheet, "data-model", &dict, NULL); + int n_rows = psppire_dict_get_var_cnt (dict); + if (row > n_rows) + return; + /* Return the IDXth variable */ struct variable *var = psppire_dict_get_variable (dict, row);