Skip to content
Snippets Groups Projects
Commit 676d4942 authored by Konstantin Kühlem's avatar Konstantin Kühlem
Browse files

fix(Navigation): Fix random crashes when using navigation without waypoints

parent b10511e5
No related branches found
No related tags found
No related merge requests found
......@@ -240,7 +240,7 @@ void UVHMovement::MoveToWaypoint()
}
// if we are at the last waypoint and it defines destroying agent, do so
if (CurrentWaypointIterator == Waypoints.Num() && Waypoints[CurrentWaypointIterator - 1]->GetLastWaypointCommand() == EOnWaypointReach::Destroy)
if (Waypoints.Num() != 0 && CurrentWaypointIterator == Waypoints.Num() && Waypoints[CurrentWaypointIterator - 1]->GetLastWaypointCommand() == EOnWaypointReach::Destroy)
{
VirtualHumanAIController->DestroyAgent();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment