diff options
author | Diego Borghetti <bdiego@gmail.com> | 2009-05-20 21:18:47 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2009-05-20 21:18:47 +0400 |
commit | 3e495458912ced0420120d7b291f88edf8e7d823 (patch) | |
tree | 3e26d9066bb678c99ab7ba9c8d7a66a401ce07ca /source/blender/makesrna/intern/rna_access.c | |
parent | d5a4a57e5c2303607a98fd4c6a0cd6fb67339bca (diff) |
Fix the fix ;)
Only check for type because ptr.data can be NULL and
ptr.type not.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 5f513bfec70..fb284aab99f 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -146,13 +146,11 @@ PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *da IDProperty *RNA_struct_idproperties(PointerRNA *ptr, int create) { - StructRNA *type; + StructRNA *type= ptr->type; - if (ptr->data) { - type= ptr->type; - if(type->idproperties) - return type->idproperties(ptr, create); - } + if(type && type->idproperties) + return type->idproperties(ptr, create); + return NULL; } |