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

Skip to content
Snippets Groups Projects
Commit f2d43061 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

move first access after null check

parent ac73a927
No related branches found
No related tags found
No related merge requests found
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
......@@ -217,10 +216,10 @@ namespace TUGraz.VectoCore.OutputData.XML.DeclarationReports.CustomerInformation
_ovc = modelData.VehicleData.OffVehicleCharging;
var inputData = modelData.InputData as IMultistepBusInputDataProvider;
Input = inputData.JobInputData.PrimaryVehicle.Vehicle;
if (inputData == null) {
throw new VectoException("CompletedBus CustomerInformationFile requires MultistepBusInputData");
}
Input = inputData.JobInputData.PrimaryVehicle.Vehicle;
Results = _resultFactory.GetCIFResultsWriter(modelData.VehicleData.VehicleCategory.GetVehicleType(),
modelData.JobType, modelData.VehicleData.OffVehicleCharging, modelData.Exempted);
InputDataIntegrity = new XElement(Cif_0_9 + XMLNames.Report_InputDataSignature,
......
......@@ -54,10 +54,6 @@ namespace TUGraz.VectoCore.OutputData.XML
vehicleData.ExemptedVehicle,
iepc,
ihpc);
}
public override void InitializeReport(VectoRunData modelData)
......
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