From: John Darrington Date: Wed, 19 Apr 2017 13:14:41 +0000 (+0200) Subject: Don't crash when attempting to enter data in a column without a variable X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ec9aefb45eeaa24d29e500f119a32f130beb928;p=pspp Don't crash when attempting to enter data in a column without a variable --- diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index d977686851..c471bc1483 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -621,6 +621,9 @@ refresh_entry (PsppireDataEditor *de) { union value val; const struct variable *var = psppire_dict_get_variable (de->dict, col); + if (var == NULL) + return; + psppire_value_entry_set_variable (PSPPIRE_VALUE_ENTRY (de->datum_entry), var); int width = var_get_width (var);