Fix: add null check

This commit is contained in:
AnnulusGames 2023-12-02 22:58:18 +09:00
parent 1b3e18c4e0
commit 6380011882

View File

@ -41,8 +41,11 @@ namespace Alchemy.Editor.Elements
try
{
buttonLabel.text = (property.managedReferenceValue == null ? "Null" : property.managedReferenceValue.GetType().Name) +
$" ({property.GetManagedReferenceFieldTypeName()})";
if (property != null)
{
buttonLabel.text = (property.managedReferenceValue == null ? "Null" : property.managedReferenceValue.GetType().Name) +
$" ({property.GetManagedReferenceFieldTypeName()})";
}
}
catch (InvalidOperationException)
{