diff --git a/src/cdrizzleapi.c b/src/cdrizzleapi.c index f24b132..6cf2e88 100644 --- a/src/cdrizzleapi.c +++ b/src/cdrizzleapi.c @@ -59,8 +59,6 @@ process_array_list(PyObject *list, integer_t *nx, integer_t *ny, PyArrayObject *arr = NULL; int i, at_least_one; - // *nx = -1; - // *ny = -1; *arrays = NULL; *nmax = 0; if (n_none) { @@ -93,6 +91,13 @@ process_array_list(PyObject *list, integer_t *nx, integer_t *ny, *nx = (int)ndim[1]; *ny = (int)ndim[0]; *arrays = arr_list; + for (int i = 0; i < (*nmax); ++i) { + if (!(*arrays)[i]) { + driz_error_set(error, PyExc_ValueError, + "Some of the 'out2_list' arrays are NULL!"); + goto _exit_on_err; + } + } return 0; } else if (!PyList_Check(list) && !PyTuple_Check(list)) {