We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce24add commit 9da5607Copy full SHA for 9da5607
Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs
@@ -1653,7 +1653,7 @@ public override void Update(float elapsedClockSeconds)
1653
{
1654
if (loco.Train.LeadLocomotiveIndex >= 0)
1655
1656
- if (loco.Train.DetermineDPLeadLocomotive(loco) is MSTSLocomotive lead && (lead.BailOff || lead.EngineBrakeController.TrainBrakeControllerState == ControllerState.BailOff))
+ if (loco.Train.DetermineDPLeadLocomotive(loco) is MSTSLocomotive lead && (lead.BailOff || (lead.EngineBrakeController != null && lead.EngineBrakeController.TrainBrakeControllerState == ControllerState.BailOff)))
1657
1658
if (loco.BrakeValve == MSTSWagon.BrakeValveType.Distributor)
1659
0 commit comments