Skip to content

Commit ee9c56d

Browse files
authored
Merge pull request #1056 from cesarBLG/brakeman-controller-nullcheck
Check for null BrakemanBrakeController
2 parents b2a8053 + 27ebc35 commit ee9c56d

File tree

1 file changed

+1
-1
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS

1 file changed

+1
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/ManualBraking.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public override void Update(float elapsedClockSeconds)
128128
SteamBrakeCompensation = 1.0f;
129129

130130
// Process manual braking on all cars
131-
if (lead != null)
131+
if (lead != null && lead.BrakemanBrakeController != null)
132132
{
133133
BrakemanBrakeSettingValue = lead.BrakemanBrakeController.CurrentValue;
134134
}

0 commit comments

Comments
 (0)