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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user