RNA: fix a crash when setting bare IDProperty pointers.
The rna_idproperty_check call should be done before accessing the prop pointer so that it can detect IDProperty values and replace them with the actual PointerPropertyRNA object. Ref D10098
This commit is contained in:
parent
38df935c09
commit
8185d07ace
|
@ -3678,8 +3678,10 @@ void RNA_property_pointer_set(PointerRNA *ptr,
|
|||
PointerRNA ptr_value,
|
||||
ReportList *reports)
|
||||
{
|
||||
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
|
||||
/* Detect IDProperty and retrieve the actual PropertyRNA pointer before cast. */
|
||||
IDProperty *idprop = rna_idproperty_check(&prop, ptr);
|
||||
|
||||
PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
|
||||
BLI_assert(RNA_property_type(prop) == PROP_POINTER);
|
||||
|
||||
/* Check types. */
|
||||
|
|
Loading…
Reference in New Issue