Fix exception in Custom Editors UI due to invalid reference value processing

#325
This commit is contained in:
Wojtek Figat
2021-03-18 15:12:25 +01:00
parent 960a122550
commit abe635ad9b
2 changed files with 4 additions and 2 deletions

View File

@@ -251,6 +251,10 @@ namespace FlaxEditor.CustomEditors
}
if (instanceValues._hasReferenceValue)
{
// If the reference value is set for the parent values but it's null object then skip it
if (instanceValues._referenceValue == null && !instanceValues.Type.IsValueType)
return;
_referenceValue = Info.GetValue(instanceValues._referenceValue);
_hasReferenceValue = true;
}