Fix the fix ;)
authorDiego Borghetti <bdiego@gmail.com>
Wed, 20 May 2009 17:18:47 +0000 (17:18 +0000)
committerDiego Borghetti <bdiego@gmail.com>
Wed, 20 May 2009 17:18:47 +0000 (17:18 +0000)
Only check for type because ptr.data can be NULL and
ptr.type not.

source/blender/makesrna/intern/rna_access.c

index 5f513bfec708a920345ebe77dd607b21fc7252d0..fb284aab99f446c26dac9ffde5e8b0e559413e96 100644 (file)
@@ -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;
 }