Fixed a bug where frequencies/histogram would crash when all data had missing wieghts.
[pspp] / src / language / stats / frequencies.c
index dc18ed83c79589cf3c028cc872e84fb934dabfe8..cb963897786d6f19c9c44cb8b12dca5cc4f1a460 100644 (file)
@@ -1324,6 +1324,8 @@ freq_tab_to_hist (const struct frq_proc *frq, const struct freq_tab *ft,
         }
     }
 
+  if (valid_freq <= 0)
+    return NULL;
 
   iqr = calculate_iqr (frq);