Use variable labels in crosstabs.
[pspp] / src / math / interaction.c
index d81eba5095b613231c5deef69d9e68f90c97ff27..269aa7e9ad9af816a56b5c95d2fc4ce9ea90dbf7 100644 (file)
@@ -60,6 +60,9 @@ interaction_create (const struct variable *v)
 void
 interaction_destroy (struct interaction *i)
 {
+  if (NULL == i)
+    return;
+
   free (i->vars);
   free (i);
 }
@@ -152,10 +155,10 @@ interaction_to_string (const struct interaction *iact, struct string *str)
 }
 
 unsigned int
-interaction_case_hash (const struct interaction *iact, const struct ccase *c)
+interaction_case_hash (const struct interaction *iact, const struct ccase *c, unsigned int base)
 {
   int i;
-  size_t hash = 0;
+  size_t hash = base;
   for (i = 0; i < iact->n_vars; ++i)
     {
       const struct variable *var = iact->vars[i];