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:
authorCampbell Barton <ideasman42@gmail.com>2010-09-24 07:24:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-24 07:24:15 +0400
commit5c99f3886e8d5f7664663c7e944dd80d1c7589e4 (patch)
treea371719fe09aae88c83ec2dd085a535bc15e5904 /source
parent05f8e53d3361f1f043f7dcf520671d3fa3a79e32 (diff)
fix for python refcounting leak, RNA_path_resolve_full now unsets the index if its not last.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index ae44cb1db7c..275e0cc7360 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -3027,6 +3027,7 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
if(nextptr.data) {
curptr= nextptr;
prop= NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
+ *index= -1;
}
else
return 0;
@@ -3069,6 +3070,7 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
if(nextptr.data) {
curptr= nextptr;
prop= NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
+ *index= -1;
}
else
return 0;
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 418bece5e7b..7bb551bd504 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1140,6 +1140,8 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, ParameterList *p
Py_XDECREF(value_new); return -1;
}
}
+
+ Py_XDECREF(value_new);
break;
}