diff --git a/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs b/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs index 72bbe6618701617a312f3c6c46f08c22ea756ae9..38b80ffa63e6d133a79436cc10a0beab26814dde 100644 --- a/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs +++ b/VectoCore/VectoCore/Models/Simulation/Impl/VehicleContainer.cs @@ -327,7 +327,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl Log.Info("VehicleContainer finishing simulation."); ModData.Finish(RunStatus); - WriteSumData(ModData, VehicleMass, VehicleLoading, Vehicle != null ? Vehicle.CargoVolume : 0.SI<CubicMeter>(), + WriteSumData(ModData, VehicleMass, VehicleLoading, Vehicle != null && Vehicle.CargoVolume != null ? Vehicle.CargoVolume : 0.SI<CubicMeter>(), Gearbox != null ? Gearbox.NumGears : 0u); ModData.FinishSimulation();