diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-18 16:02:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-18 16:02:09 +0300 |
commit | d3794d9f945d3d85394549e4570c38147a3283a1 (patch) | |
tree | f5f0d0ef602c41fced41874fec3d4b6c8b8c1eb2 /source/blender/makesrna/intern/rna_access.c | |
parent | 49c47fbf300f1f6419d504d9ebe7ecd756dfe808 (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.c | 7 |
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); |