diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-02-27 18:24:25 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-02-27 18:24:25 +0000 |
commit | def1c92c288699c65356e52722487bbacc036343 (patch) | |
tree | 9ab393e99e036d0fed47850d631efd21416b4841 /numpy/core/src/arrayobject.c | |
parent | 1b3fcc6fdf4572a5b265794d60c798cbc0d0e288 (diff) | |
download | numpy-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.c | 2 |
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); |