[Numpy-svn] r3541 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Wed Feb 7 17:17:30 CST 2007


Author: oliphant
Date: 2007-02-07 17:17:28 -0600 (Wed, 07 Feb 2007)
New Revision: 3541

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Fix possible segfault.

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2007-02-06 04:03:04 UTC (rev 3540)
+++ trunk/numpy/core/src/multiarraymodule.c	2007-02-07 23:17:28 UTC (rev 3541)
@@ -4039,7 +4039,7 @@
 PyArray_OrderConverter(PyObject *object, NPY_ORDER *val)
 {
         char *str;
-        if (object == Py_None) {
+        if (object == NULL || object == Py_None) {
                 *val = PyArray_ANYORDER;
         }
         else if (!PyString_Check(object) || PyString_GET_SIZE(object) < 1) {



More information about the Numpy-svn mailing list