}
return n_indep_vars;
}
+
static double
fill_covariance (gsl_matrix *cov, struct covariance *all_cov,
const struct variable **vars,
size_t dep_subscript;
size_t *rows;
const gsl_matrix *ssizes;
- gsl_matrix *cm;
const gsl_matrix *mean_matrix;
const gsl_matrix *ssize_matrix;
double result = 0.0;
- cm = covariance_calculate_unnormalized (all_cov);
+ gsl_matrix *cm = covariance_calculate_unnormalized (all_cov);
+
+ if ( cm == NULL)
+ return 0;
+
rows = xnmalloc (cov->size1 - 1, sizeof (*rows));
for (i = 0; i < n_all_vars; i++)
,,,,,,
])
AT_CLEANUP
+
+AT_SETUP([REGRESSION no crash on all missing])
+AT_DATA([regcrash.sps], [dnl
+data list list /x * y.
+begin data.
+ . .
+ . .
+ . .
+ . .
+ . .
+ . .
+ . .
+ . .
+ . .
+ . .
+end data.
+
+
+regression /variables=x y /dependent=y.
+])
+
+AT_CHECK([pspp -o pspp.csv regcrash.sps], [1], [ignore], [ignore])
+
+AT_CLEANUP