From fa565098c0d19a0deb6d52a72c1674518f6361ed Mon Sep 17 00:00:00 2001 From: Mihai Cara Date: Mon, 9 Dec 2024 18:03:54 -0500 Subject: [PATCH] An attempt (#3) to figure out failing tests on Windows --- src/cdrizzleapi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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)) {