diff --git a/Source/Editor/SceneGraph/Actors/SplineNode.cs b/Source/Editor/SceneGraph/Actors/SplineNode.cs index 411bf29a3..8e62347b2 100644 --- a/Source/Editor/SceneGraph/Actors/SplineNode.cs +++ b/Source/Editor/SceneGraph/Actors/SplineNode.cs @@ -306,6 +306,13 @@ namespace FlaxEditor.SceneGraph.Actors private void OnUpdate() { + // Prevent update event called when actor got deleted (incorrect state) + if (!Actor) + { + FlaxEngine.Scripting.Update -= OnUpdate; + return; + } + // If this node's point is selected var selection = Editor.Instance.SceneEditing.Selection; if (selection.Count == 1 && selection[0] is SplinePointNode selectedPoint && selectedPoint.ParentNode == this)