From fa633e0c0b2ff54b2b7294a5cebcfe11af124582 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 8 Apr 2017 14:40:08 +0200 Subject: [PATCH] Variable Sheet: Display 'None' for value labels if the count is zero --- src/ui/gui/psppire-data-editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 65e25a51d6..9eff4cb4b8 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -111,7 +111,7 @@ var_sheet_data_to_string (GtkTreeModel *m, gint col, gint row, const GValue *in) else if (col == DICT_TVM_COL_VALUE_LABELS) { const struct val_labs *vls = var_get_value_labels (var); - if (vls == NULL) + if (vls == NULL || val_labs_count (vls) == 0) return strdup (_("None")); const struct val_lab **labels = val_labs_sorted (vls); const struct val_lab *vl = labels[0]; -- 2.30.2