UI:
[blender.git] / source / blender / makesrna / intern / rna_access.c
index 3fcc2d18487e965a6ed58a94789048de3851c2f4..52b1b77ddf091c33bb7dc2d42a8a023887f1cb07 100644 (file)
@@ -457,13 +457,20 @@ int RNA_property_string_maxlength(PointerRNA *ptr, PropertyRNA *prop)
 
 StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
 {
-       PointerPropertyRNA *pprop;
-       
        rna_idproperty_check(&prop, ptr);
-       pprop= (PointerPropertyRNA*)prop;
 
-       if(pprop->type)
-               return pprop->type;
+       if(prop->type == PROP_POINTER) {
+               PointerPropertyRNA *pprop= (PointerPropertyRNA*)prop;
+
+               if(pprop->type)
+                       return pprop->type;
+       }
+       else if(prop->type == PROP_COLLECTION) {
+               CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+
+               if(cprop->type)
+                       return cprop->type;
+       }
 
        return &RNA_UnknownType;
 }