Skip to content

Commit

Permalink
Fix segfault when PyArray_VOID and no minitype in _array_find_type.
Browse files Browse the repository at this point in the history
  • Loading branch information
walshb committed Aug 21, 2011
1 parent 6fdfd9c commit 1336429
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpy/core/src/multiarray/common.c
Expand Up @@ -286,7 +286,7 @@ _array_find_type(PyObject *op, PyArray_Descr *minitype, int max)
* unless input was already a VOID * unless input was already a VOID
*/ */
if (outtype->type_num == PyArray_VOID && if (outtype->type_num == PyArray_VOID &&
minitype->type_num != PyArray_VOID) { (minitype == NULL || minitype->type_num != PyArray_VOID)) {
Py_DECREF(outtype); Py_DECREF(outtype);
return PyArray_DescrFromType(PyArray_OBJECT); return PyArray_DescrFromType(PyArray_OBJECT);
} }
Expand Down

0 comments on commit 1336429

Please sign in to comment.