fixed nullpointer in pathfinding class