Fixed a crash which occured when GRAPH /HISTOGRAM was called
on a dataset with less than 2 data.'
histogram_create (bin_width, cmd->es[0].minimum, cmd->es[0].maximum);
}
+ if (NULL == histogram)
+ {
+ casereader_destroy (input);
+ return;
+ }
for (;(c = casereader_read (input)) != NULL; case_unref (c))
{
AT_CLEANUP
+AT_SETUP([GRAPH histogram with null data])
+AT_DATA([null-hist.sps], [dnl
+data list list /x *.
+begin data.
+1109
+.
+end data.
+
+graph
+ /histogram = x.
+
+])
+
+AT_CHECK([pspp -o pspp.pdf null-hist.sps], [0], [ignore])
+dnl Ignore output -- this is just a no-crash check.
+AT_CLEANUP