Fix crash when ONEWAY/CONTRASTS contained an empty list.
[pspp] / src / language / stats / oneway.c
index 9650dc6e6a7c3f14ed5afeb9446dedf6c52e86c1..8d7867234b0ce687a94502dfd990fdb0168c606e 100644 (file)
@@ -545,6 +545,9 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds)
                  goto error;
                }
            }
+         
+         if ( ll_count (coefficient_list) <= 0)
+           goto error;
 
          ll_push_tail (&oneway.contrast_list, &cl->ll);
        }