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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/NMesh.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c
index 2e82c55155f..22f619c5f31 100644
--- a/source/blender/python/api2_2x/NMesh.c
+++ b/source/blender/python/api2_2x/NMesh.c
@@ -1476,7 +1476,7 @@ static PyObject *NMesh_update( PyObject *self, PyObject *a, PyObject *kwd )
static PyObject *NMesh_getVertexInfluences( PyObject * self, PyObject * args )
{
int index;
- PyObject *influence_list = NULL;
+ PyObject *influence_list = NULL, *item;
Object *object = ( ( BPy_NMesh * ) self )->object;
Mesh *me = ( ( BPy_NMesh * ) self )->mesh;
@@ -1516,9 +1516,11 @@ static PyObject *NMesh_getVertexInfluences( PyObject * self, PyObject * args )
for( i = 0; i < totinfluences; i++, sweight++ ) {
bDeformGroup *defgroup = (bDeformGroup *) BLI_findlink( &object->defbase,
sweight->def_nr );
- if( defgroup )
- PyList_Append( influence_list, Py_BuildValue( "[sf]",
- defgroup->name, sweight->weight ) );
+ if( defgroup ) {
+ item = Py_BuildValue( "[sf]", defgroup->name, sweight->weight );
+ PyList_Append( influence_list, item);
+ Py_DECREF(item);
+ }
}
}