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>2012-03-12 10:53:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-12 10:53:47 +0400
commitaedd4af57e5777dd32585560980f4661ec4d491d (patch)
tree81d7514200d498b01ef621c83052cf5f42aac84f /source/blender/makesrna/intern/rna_access.c
parent0873cbaed5aea31f3fc8b16dacecb2d332c9b6f5 (diff)
code cleanup/bugfix uninitialized values
- edgebisect bmesh operator used uninialized beauty field. - BLI_join_dirfile could read from before the string bounds when passed an empty dir string. - pransform could use an uninitialized projected coordinate (unlikely but possible) - RNA_property_path_from_ID_check would compare against an uninitialized pointer when the path wasn't found. also have bmesh walker use BM_edge_other_vert() utility function.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 2ccd7d293d3..543824eb5d5 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1430,8 +1430,12 @@ int RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA *r_prop;
RNA_id_pointer_create(ptr->id.data, &id_ptr);
- RNA_path_resolve(&id_ptr, path, &r_ptr, &r_prop);
- ret = (prop == r_prop);
+ if (RNA_path_resolve(&id_ptr, path, &r_ptr, &r_prop) == TRUE) {
+ ret = (prop == r_prop);
+ }
+ else {
+ ret = FALSE;
+ }
MEM_freeN(path);
}