mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 23:50:29 +01:00
Added null check for path
This commit is contained in:
parent
9a4c2d983e
commit
f2729a41b4
1 changed files with 1 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ namespace SceneManager.Utils
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var vehicleCollectedOnAnotherPath = PathManager.Paths.Any(p => p.Number != path.Number && p.CollectedPeds.Any(cp => cp && cp.CurrentVehicle == vehicle));
|
var vehicleCollectedOnAnotherPath = PathManager.Paths.Any(p => p != null && p.Number != path.Number && p.CollectedPeds.Any(cp => cp && cp.CurrentVehicle == vehicle));
|
||||||
if (vehicleCollectedOnAnotherPath)
|
if (vehicleCollectedOnAnotherPath)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue