[Bug] Get tangent exception

Hi, I think that there might be a minor bug related to getting the tangent of the path when a gameobject with a movement script is being disabled. I am disabling couple of my agents when they reach a certain destination. When the disabling happens my console is being spammed with:

NullReferenceException: Object reference not set to an instance of an object
Pathfinding.Util.PathInterpolator.get_tangent () (at Library/PackageCache/com.arongranberg.astar@4.3.41/Core/Misc/PathInterpolator.cs:32)
Pathfinding.AILerp.CalculateNextPosition (UnityEngine.Vector3& direction, System.Single deltaTime) (at Library/PackageCache/com.arongranberg.astar@4.3.41/Core/AI/AILerp.cs:686)

This maybe isn’t much, but is pretty annoying when you try to keep the console clean :slight_smile:

I am using a subclass of AILerp if that matters.

I’m experiencing the same issue right now.

I saw this thread https://forum.arongranberg.com/t/disable-pathfinding-behaviour-when-reaching-destination/4976/8

But I’m not ever setting my AI Class to be disabled so I’m not totally sure this is the same issue