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>2009-11-18 16:02:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-18 16:02:09 +0300
commitd3794d9f945d3d85394549e4570c38147a3283a1 (patch)
treef5f0d0ef602c41fced41874fec3d4b6c8b8c1eb2 /source/blender/makesrna/intern/rna_access.c
parent49c47fbf300f1f6419d504d9ebe7ecd756dfe808 (diff)
fix for memory leak, use Key Errors for pyrna getitem access & idprops
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 355b61a0c49..3e30827fad2 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2344,13 +2344,8 @@ int RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, Prope
if(use_id_prop) { /* look up property name in current struct */
IDProperty *group= RNA_struct_idproperties(ptr, 0);
- if(!group)
- return 0;
-
- if(rna_token_strip_quotes(token))
+ if(group && rna_token_strip_quotes(token))
prop= (PropertyRNA *)IDP_GetPropertyFromGroup(group, token+1);
- else
- prop= NULL;
}
else {
prop= RNA_struct_find_property(&curptr, token);