Fix error when applying prefab changes with Spline

#2384
This commit is contained in:
Wojtek Figat
2024-04-05 16:43:18 +02:00
parent 7578e1dbe3
commit a83b589e12
2 changed files with 2 additions and 2 deletions

View File

@@ -536,7 +536,7 @@ namespace FlaxEditor.CustomEditors
/// </summary> /// </summary>
public void ClearReferenceValueAll() public void ClearReferenceValueAll()
{ {
Values.ClearReferenceValue(); Values?.ClearReferenceValue();
for (int i = 0; i < ChildrenEditors.Count; i++) for (int i = 0; i < ChildrenEditors.Count; i++)
{ {

View File

@@ -164,7 +164,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
//Presenter.BuildLayoutOnUpdate(); //Presenter.BuildLayoutOnUpdate();
// Better way is to just update the reference value using the new default instance of the prefab, created after changes apply // Better way is to just update the reference value using the new default instance of the prefab, created after changes apply
if (prefab && !prefab.WaitForLoaded()) if (Values != null && prefab && !prefab.WaitForLoaded())
{ {
var actor = (Actor)Values[0]; var actor = (Actor)Values[0];
var prefabObjectId = actor.PrefabObjectID; var prefabObjectId = actor.PrefabObjectID;