Fix T51198: Crash with new Datablock ID Properties
This commit is contained in:
parent
6da53e46c9
commit
31c644b657
@ -5599,12 +5599,13 @@ static char *rna_pointer_as_string__bldata(PointerRNA *ptr)
|
||||
}
|
||||
}
|
||||
|
||||
char *RNA_pointer_as_string(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *prop_ptr, PointerRNA *ptr_prop)
|
||||
char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop_ptr, PointerRNA *ptr_prop)
|
||||
{
|
||||
IDProperty *prop;
|
||||
if (ptr_prop->data == NULL) {
|
||||
return BLI_strdup("None");
|
||||
}
|
||||
else if (RNA_property_flag(prop_ptr) & PROP_IDPROPERTY) {
|
||||
else if ((prop = rna_idproperty_check(&prop_ptr, ptr)) && prop->type != IDP_ID) {
|
||||
return RNA_pointer_as_string_id(C, ptr_prop);
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user