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:
authorCampbell Barton <ideasman42@gmail.com>2007-05-28 01:33:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-05-28 01:33:48 +0400
commitbcc314311969959df482dd5525703533d875d023 (patch)
tree5e5a622471e0214b3ba481ba503ecee1cfa6b06c /source/blender/python/api2_2x/sceneSequence.c
parentd9e85385fd083ef11ccc4ffa06f9120599f18510 (diff)
more memory leak fixes, though only a few are likely to happen
Diffstat (limited to 'source/blender/python/api2_2x/sceneSequence.c')
-rw-r--r--source/blender/python/api2_2x/sceneSequence.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/sceneSequence.c b/source/blender/python/api2_2x/sceneSequence.c
index e8b9b99c218..e7c8abe72a2 100644
--- a/source/blender/python/api2_2x/sceneSequence.c
+++ b/source/blender/python/api2_2x/sceneSequence.c
@@ -512,23 +512,30 @@ static PyObject *Sequence_getImages( BPy_Sequence * self )
Strip *strip;
StripElem *se;
int i;
- PyObject *attr;
+ PyObject *list, *ret;
+
+ if (self->seq->type != SEQ_IMAGE) {
+ list = PyList_New(0);
+ ret= Py_BuildValue( "sO", "", list);
+ Py_DECREF(list);
+ return ret;
+ }
- if (self->seq->type != SEQ_IMAGE)
- return PyList_New(0);
/*return EXPP_ReturnPyObjError( PyExc_TypeError,
"Sequence is not an image type" );*/
strip = self->seq->strip;
se = strip->stripdata;
- attr = PyList_New(strip->len);
+ list = PyList_New(strip->len);
for (i=0; i<strip->len; i++, se++) {
- PyList_SetItem( attr, i, PyString_FromString(se->name) );
+ PyList_SetItem( list, i, PyString_FromString(se->name) );
}
-
- return attr;
+
+ ret= Py_BuildValue( "sO", strip->dir, list);
+ Py_DECREF(list);
+ return ret;
}