diff options
author | Ken Hughes <khughes@pacific.edu> | 2005-11-19 18:06:20 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2005-11-19 18:06:20 +0300 |
commit | 555a3d02c7c842cb3a53d63ec6c695541ba845b1 (patch) | |
tree | 13d0f5528a7b3ef84facbc0b1c1de97f288c1429 /source/blender/python/api2_2x/Effect.c | |
parent | 8b50c50345fa9e4c60d2127477f33058fdf631f4 (diff) |
-- fix bug which used unitialized pointer in M_Effect_New.
Diffstat (limited to 'source/blender/python/api2_2x/Effect.c')
-rw-r--r-- | source/blender/python/api2_2x/Effect.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/python/api2_2x/Effect.c b/source/blender/python/api2_2x/Effect.c index d48e4e21146..3d397f0d1ad 100644 --- a/source/blender/python/api2_2x/Effect.c +++ b/source/blender/python/api2_2x/Effect.c @@ -539,7 +539,6 @@ struct PyMethodDef M_Effect_methods[] = { /*****************************************************************************/ PyObject *M_Effect_New( PyObject * self, PyObject * args ) { - BPy_Effect *pyeffect; Effect *bleffect = 0; Object *ob; char *name = NULL; @@ -561,13 +560,10 @@ PyObject *M_Effect_New( PyObject * self, PyObject * args ) "object is not a mesh" ); bleffect = add_effect( EFF_PARTICLE ); - if( !bleffect ) { - Py_DECREF( pyeffect ); + if( !bleffect ) return EXPP_ReturnPyObjError( PyExc_RuntimeError, "couldn't create Effect Data in Blender" ); - } - pyeffect->effect = (PartEff *)bleffect; BLI_addtail( &ob->effect, bleffect ); return EffectCreatePyObject( bleffect, ob ); @@ -584,7 +580,6 @@ PyObject *M_Effect_Get( PyObject * self, PyObject * args ) char *name = NULL; Object *object_iter; Effect *eff; - BPy_Effect *wanted_eff; int num = -1, i; if( !PyArg_ParseTuple( args, "|si", &name, &num ) ) |