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:
parent
55056cc1f3
commit
dfbf027b0f
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue