fix own error - EXPP_getScriptLinks, was returning an unset list.
This commit is contained in:
@@ -395,15 +395,15 @@ PyObject *EXPP_getScriptLinks( ScriptLink * slink, PyObject * args,
|
|||||||
return EXPP_ReturnPyObjError( PyExc_TypeError,
|
return EXPP_ReturnPyObjError( PyExc_TypeError,
|
||||||
"expected event name (string) as argument" );
|
"expected event name (string) as argument" );
|
||||||
|
|
||||||
/* actually !scriptlink shouldn't happen ... */
|
|
||||||
if( !slink || !slink->totscript )
|
|
||||||
return list;
|
|
||||||
|
|
||||||
list = PyList_New( 0 );
|
list = PyList_New( 0 );
|
||||||
if( !list )
|
if( !list )
|
||||||
return EXPP_ReturnPyObjError( PyExc_MemoryError,
|
return EXPP_ReturnPyObjError( PyExc_MemoryError,
|
||||||
"couldn't create PyList!" );
|
"couldn't create PyList!" );
|
||||||
|
|
||||||
|
/* actually !scriptlink shouldn't happen ... */
|
||||||
|
if( !slink || !slink->totscript )
|
||||||
|
return list;
|
||||||
|
|
||||||
if( !strcmp( eventname, "FrameChanged" ) )
|
if( !strcmp( eventname, "FrameChanged" ) )
|
||||||
event = SCRIPT_FRAMECHANGED;
|
event = SCRIPT_FRAMECHANGED;
|
||||||
else if( !strcmp( eventname, "Redraw" ) )
|
else if( !strcmp( eventname, "Redraw" ) )
|
||||||
@@ -415,7 +415,7 @@ PyObject *EXPP_getScriptLinks( ScriptLink * slink, PyObject * args,
|
|||||||
else if( is_scene && !strcmp( eventname, "OnSave" ) )
|
else if( is_scene && !strcmp( eventname, "OnSave" ) )
|
||||||
event = SCRIPT_ONSAVE;
|
event = SCRIPT_ONSAVE;
|
||||||
else {
|
else {
|
||||||
Py_XDECREF(list);
|
Py_DECREF(list);
|
||||||
return EXPP_ReturnPyObjError( PyExc_AttributeError,
|
return EXPP_ReturnPyObjError( PyExc_AttributeError,
|
||||||
"invalid event name" );
|
"invalid event name" );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user