summaryrefslogtreecommitdiff
path: root/numpy/core/src/arrayobject.c
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-02-27 18:24:25 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-02-27 18:24:25 +0000
commitdef1c92c288699c65356e52722487bbacc036343 (patch)
tree9ab393e99e036d0fed47850d631efd21416b4841 /numpy/core/src/arrayobject.c
parent1b3fcc6fdf4572a5b265794d60c798cbc0d0e288 (diff)
downloadnumpy-def1c92c288699c65356e52722487bbacc036343.tar.gz
Fix segfault due to no error check.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r--numpy/core/src/arrayobject.c2
1 files changed, 1 insertions, 1 deletions
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);