Forums › 💬 NodeCanvas › ⚙️ Support › [PATCH] when agent is null › Reply To: [PATCH] when agent is null
Hi,
When I am destroying a character I call in OnDestroy() _currentActivityGraph?.Stop(); This should be enough to abort the graph, I guess.
_currentActivityGraph?.Stop();
However, I got the null-ref-exception at OnUpdate() before your quoted check is executed:
It was not clear how to reproduce it. So, I am not quiete sure what caused the graph to get there. If I find out more, I will let you know.