Actually implement the new procedure code and adapt all of its clients
[pspp-builds.git] / src / data / dictionary.c
index d77d9fdd1ed2b78620a87a6103f6f4304f0c4095..34ffc6af541eaccaba3695dc46f1244c07a0254c 100644 (file)
@@ -718,7 +718,7 @@ dict_get_case_weight (const struct dictionary *d, const struct ccase *c,
       double w = case_num (c, d->weight);
       if (w < 0.0 || var_is_num_missing (d->weight, w, MV_ANY))
         w = 0.0;
-      if ( w == 0.0 && *warn_on_invalid ) {
+      if ( w == 0.0 && warn_on_invalid != NULL && *warn_on_invalid ) {
          *warn_on_invalid = false;
          msg (SW, _("At least one case in the data file had a weight value "
                     "that was user-missing, system-missing, zero, or "