Fix crash when opening empty dataset
[pspp-builds.git] / src / ui / gui / psppire-data-store.c
index 07795124338fab69cd40b4e268641edb48648b47..65001dd170d98a3edaa903a619244b38e931b38f 100644 (file)
@@ -801,6 +801,9 @@ get_column_button_label (const PsppireSheetModel *model, gint col)
 
   pv = psppire_dict_get_variable (ds->dict, col);
 
+  if (NULL == pv)
+    return NULL;
+
   return xstrdup (var_get_name (pv));
 }