Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2005-06-17 09:10:14 +0400
committerMartin Poirier <theeth@yahoo.com>2005-06-17 09:10:14 +0400
commit5f5844b95e3f44c67ad5a962f28c1ed0e31910c5 (patch)
treed3761863cfa4d32fb849b7b11ba0913afa45789d /source/blender/python/api2_2x/Camera.c
parent2a640f03cd71cf96b817a37cdd72f8e27f3f732a (diff)
Some of the setattr functions created a tuple to pass to the set* functions and didn't decref'ed it properly, "leaking" memory.
Commit approved by stivs.
Diffstat (limited to 'source/blender/python/api2_2x/Camera.c')
-rw-r--r--source/blender/python/api2_2x/Camera.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/python/api2_2x/Camera.c b/source/blender/python/api2_2x/Camera.c
index ecf9ba57333..feac25b5b7c 100644
--- a/source/blender/python/api2_2x/Camera.c
+++ b/source/blender/python/api2_2x/Camera.c
@@ -843,12 +843,9 @@ static PyObject *Camera_getAttr( BPy_Camera * self, char *name )
attr = PyFloat_FromDouble( self->camera->drawsize );
else if( strcmp( name, "users" ) == 0 )
attr = PyInt_FromLong( self->camera->id.us );
- else if( strcmp( name, "ipo" ) == 0 ) {
- Ipo *ipo = self->camera->ipo;
- if( ipo )
- attr = Ipo_CreatePyObject( ipo );
- }
-
+ else if( strcmp( name, "ipo" ) == 0 )
+ /* getIpo can return None and that is a valid value, so need to return straightaway */
+ return Camera_getIpo(self);
else if( strcmp( name, "Types" ) == 0 ) {
attr = Py_BuildValue( "{s:h,s:h}", "persp",
EXPP_CAM_TYPE_PERSP, "ortho",