1
Fork 0
mirror of https://github.com/thegeneralist01/Scene-Manager-DevRepo synced 2026-01-11 23:50:29 +01:00

Added null check for collectedVehicle in DriveVehicleToNextWaypoint

This commit is contained in:
Rich Dunne 2020-09-07 00:04:41 -06:00
parent 55056cc1f3
commit dfbf027b0f

View file

@ -32,6 +32,10 @@ namespace SceneManager
private static void DriveVehicleToNextWaypoint(CollectedVehicle collectedVehicle, List<Waypoint> waypoints, Waypoint currentWaypoint) private static void DriveVehicleToNextWaypoint(CollectedVehicle collectedVehicle, List<Waypoint> waypoints, Waypoint currentWaypoint)
{ {
if (collectedVehicle == null)
{
return;
}
if (!collectedVehicle.Vehicle) if (!collectedVehicle.Vehicle)
{ {
return; return;