Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit d2ad4e7d authored by Harald Martini's avatar Harald Martini
Browse files

fixed null reference errors for exempted vehicles in XMLDeclartionReport_0_9

parent c299d2a3
No related branches found
No related tags found
No related merge requests found
......@@ -36,12 +36,12 @@ namespace TUGraz.VectoCore.OutputData.XML
protected override void InstantiateReports(VectoRunData modelData)
{
var vehicleData = modelData.VehicleData.InputData;
var iepc = vehicleData.Components.IEPC != null;
var iepc = vehicleData.Components?.IEPC != null;
var ihpc =
vehicleData.Components.ElectricMachines?.Entries?.Count(e => e.ElectricMachine.IHPCType != "None") > 0;
vehicleData.Components?.ElectricMachines?.Entries?.Count(e => e.ElectricMachine.IHPCType != "None") > 0;
if (modelData.Exempted) {
throw new NotImplementedException();
PrimaryReport = new XMLExemptedPrimaryBusVehicleReport();
}
PrimaryReport = new XMLPrimaryBusVehicleReport();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment