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:
Diffstat (limited to 'source/blender/python/api2_2x/Text.c')
-rw-r--r--source/blender/python/api2_2x/Text.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Text.c b/source/blender/python/api2_2x/Text.c
index e106bfea482..da4fbe44eb0 100644
--- a/source/blender/python/api2_2x/Text.c
+++ b/source/blender/python/api2_2x/Text.c
@@ -218,11 +218,12 @@ static PyObject *M_Text_Get( PyObject * self, PyObject * args )
while( txt_iter ) {
pyobj = Text_CreatePyObject( txt_iter );
- if( !pyobj )
+ if( !pyobj ) {
+ Py_DECREF(txtlist);
return ( EXPP_ReturnPyObjError
( PyExc_MemoryError,
"couldn't create PyString" ) );
-
+ }
PyList_SET_ITEM( txtlist, index, pyobj );
txt_iter = txt_iter->id.next;