Rewrote most of the examine command.
[pspp-builds.git] / src / value-labels.c
index 8b1d32869e2622398111f5bc2afcb9024ddbec80..16e649687cb577db05891b75f9ee913251d92f6e 100644 (file)
@@ -500,7 +500,13 @@ value_to_string(const union value *val, const struct variable *var)
 {
   static char buf[100];
   char *s;
-  const struct val_labs *val_labs = var->val_labs;
+  const struct val_labs *val_labs ;
+  
+  if ( !val || ! var ) 
+    return 0;
+
+  val_labs = var->val_labs;
+
   
   s = val_labs_find (val_labs, *val);