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/Group.c')
-rwxr-xr-xsource/blender/python/api2_2x/Group.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c
index fa43bed58cc..7a6a1562d8b 100755
--- a/source/blender/python/api2_2x/Group.c
+++ b/source/blender/python/api2_2x/Group.c
@@ -426,11 +426,12 @@ PyObject *M_Group_Get( PyObject * self, PyObject * args )
while( group_iter ) {
pyobj = Group_CreatePyObject( group_iter );
- if( !pyobj )
+ if( !pyobj ) {
+ Py_DECREF(grouplist);
return ( EXPP_ReturnPyObjError
( PyExc_MemoryError,
"couldn't create Object" ) );
-
+ }
PyList_SET_ITEM( grouplist, index, pyobj );
group_iter = group_iter->id.next;