From 639bebbc75e6b03134a5732642d6cad80302d7e6 Mon Sep 17 00:00:00 2001 From: dexy Date: Sat, 9 Nov 2019 21:10:06 +1100 Subject: [PATCH] Fix for crash with modded scenario files --- CodeWalker.Core/World/Scenarios.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CodeWalker.Core/World/Scenarios.cs b/CodeWalker.Core/World/Scenarios.cs index 04b9bc1..8be95ba 100644 --- a/CodeWalker.Core/World/Scenarios.cs +++ b/CodeWalker.Core/World/Scenarios.cs @@ -223,8 +223,8 @@ namespace CodeWalker.World else { } } - - isveh = scp.Type.Value.IsVehicle; + + isveh = scp.Type?.IsVehicle ?? false; //TODO: make a warning about this if scp.Type is null? } else { }