Fix crash in python API (Campbell: please check :) ) -- using myLamp.setType(number) crashed blender (reported in IRC by Djoef)

This commit is contained in:
2008-06-30 14:44:12 +00:00
parent 6a3e8e7fff
commit 5b15a610ee

View File

@@ -1525,7 +1525,11 @@ static PyObject *Lamp_oldsetType( BPy_Lamp * self, PyObject * value )
if( !value )
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"expected string argument" ) );
if( !type )
return EXPP_ReturnPyObjError ( PyExc_AttributeError,
"expected string argument" );
/* check for valid arguments, set type accordingly */
if( !strcmp( type, "Lamp" ) )