From def1c92c288699c65356e52722487bbacc036343 Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Mon, 27 Feb 2006 18:24:25 +0000 Subject: Fix segfault due to no error check. --- numpy/core/src/arrayobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/src/arrayobject.c') diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 212064807..bc0a7abdb 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -3042,8 +3042,8 @@ array_slice(PyArrayObject *self, int ilow, int ihigh) self->nd, self->dimensions, self->strides, data, self->flags, (PyObject *)self); - self->dimensions[0] = l; + if (r == NULL) return NULL; r->base = (PyObject *)self; Py_INCREF(self); PyArray_UpdateFlags(r, UPDATE_ALL_FLAGS); -- cgit v1.2.1