summaryrefslogtreecommitdiff
path: root/numpy/f2py/src
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/src')
-rw-r--r--numpy/f2py/src/fortranobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c
index 4a1fe0cf4..3e6ccb079 100644
--- a/numpy/f2py/src/fortranobject.c
+++ b/numpy/f2py/src/fortranobject.c
@@ -543,6 +543,7 @@ PyArrayObject* array_from_pyobj(const int type_num,
NULL,NULL,0,
!(intent&F2PY_INTENT_C),
NULL);
+ if (arr==NULL) return NULL;
if (!(intent & F2PY_INTENT_CACHE))
PyArray_FILLWBYTE(arr, 0);
return arr;