diff --git a/Source/Editor/CustomEditors/Editors/TypeEditor.cs b/Source/Editor/CustomEditors/Editors/TypeEditor.cs index 03df18c08..38800a738 100644 --- a/Source/Editor/CustomEditors/Editors/TypeEditor.cs +++ b/Source/Editor/CustomEditors/Editors/TypeEditor.cs @@ -492,9 +492,15 @@ namespace FlaxEditor.CustomEditors.Editors if (!HasDifferentValues && Values[0] is string asTypename && !string.Equals(asTypename, _lastTypeNameError, StringComparison.Ordinal)) { - _element.CustomControl.Value = TypeUtils.GetType(asTypename); - if (_element.CustomControl.Value == null && asTypename.Length != 0) - _lastTypeNameError = asTypename; + try + { + _element.CustomControl.Value = TypeUtils.GetType(asTypename); + } + finally + { + if (_element.CustomControl.Value == null && asTypename.Length != 0) + _lastTypeNameError = asTypename; + } } } }