Permalink
Browse files

Fix segfault when PyArray_VOID and no minitype in _array_find_type.

  • Loading branch information...
1 parent 6fdfd9c commit 133642959ff1a7eab5539953abe6b7b59f8462a7 @walshb committed Aug 21, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 numpy/core/src/multiarray/common.c
@@ -286,7 +286,7 @@ _array_find_type(PyObject *op, PyArray_Descr *minitype, int max)
* unless input was already a VOID
*/
if (outtype->type_num == PyArray_VOID &&
- minitype->type_num != PyArray_VOID) {
+ (minitype == NULL || minitype->type_num != PyArray_VOID)) {
Py_DECREF(outtype);
return PyArray_DescrFromType(PyArray_OBJECT);
}

0 comments on commit 1336429

Please sign in to comment.