== PyNodes ==
authorWillian Padovani Germano <wpgermano@gmail.com>
Fri, 30 May 2008 20:04:52 +0000 (20:04 +0000)
committerWillian Padovani Germano <wpgermano@gmail.com>
Fri, 30 May 2008 20:04:52 +0000 (20:04 +0000)
Bug #13277, reported by Juho (bebraw) Vepsalainen (thanks!) - a typo made pynodes w/o input socket definitions fail with an out of range error when accessing the output sockets in the script.

source/blender/python/api2_2x/Node.c

index 92529023b7e44afeb186027dbb3489f5585cf307..792b23315084c5ea648733f84782d1c9b8bbf943 100644 (file)
@@ -848,7 +848,7 @@ static int Sockoutmap_assign_subscript(BPy_SockMap *self, PyObject *pyidx, PyObj
 
        if (PyInt_Check(pyidx)) {
                idx = (int)PyInt_AsLong(pyidx);
-               if (idx < 0 || idx >= Sockinmap_len(self))
+               if (idx < 0 || idx >= Sockoutmap_len(self))
                        return EXPP_ReturnIntError(PyExc_IndexError, "index out of range");
        }
        else if (PyString_Check(pyidx)) {