Fix segfault on Outliner.

Try to expand the RNA tree in Outliner -> User Preference crash blender.

RNA_struct_idproperties was not checking if ptr.data is NULL
and always try to access the properties type information.

Note: brecht double check this.
This commit is contained in:
Diego Borghetti
2009-05-20 15:59:57 +00:00
parent 240ee1104c
commit 8407c94f0b

View File

@@ -146,11 +146,13 @@ PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *da
IDProperty *RNA_struct_idproperties(PointerRNA *ptr, int create)
{
StructRNA *type= ptr->type;
StructRNA *type;
if(type->idproperties)
return type->idproperties(ptr, create);
if (ptr->data) {
type= ptr->type;
if(type->idproperties)
return type->idproperties(ptr, create);
}
return NULL;
}