Unity Null Reference Exception

July 18, 2020

I had this exception on play

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Graphs.Edge.WakeUp () (at <9061962f637f4c89b5332c95b2cf7751>:0)
UnityEditor.Graphs.Graph.DoWakeUpEdges (System.Collections.Generic.List`1[T] inEdges, System.Collections.Generic.List`1[T] ok, System.Collections.Generic.List`1[T] error, System.Boolean inEdgesUsedToBeValid) (at <9061962f637f4c89b5332c95b2cf7751>:0)
UnityEditor.Graphs.Graph.WakeUpEdges (System.Boolean clearSlotEdges) (at <9061962f637f4c89b5332c95b2cf7751>:0)
UnityEditor.Graphs.Graph.WakeUp (System.Boolean force) (at <9061962f637f4c89b5332c95b2cf7751>:0)
UnityEditor.Graphs.Graph.WakeUp () (at <9061962f637f4c89b5332c95b2cf7751>:0)
UnityEditor.Graphs.Graph.OnEnable () (at <9061962f637f4c89b5332c95b2cf7751>:0)

Initially I thought it was related to the Execution Order, but while I was playing around with animations I also deleted a bunch of files…

Restart the app (or reload the object whose files have been deleted/has wrong references) and that should make it go away.