File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1535,12 +1535,18 @@ public override void Initialize()
15351535 TrainBrakeController = new ScriptedBrakeController ( this ) ; //create a blank one
15361536 TrainBrakeController . Initialize ( ) ;
15371537 }
1538- EngineBrakeController . Initialize ( ) ;
1539- if ( ! EngineBrakeController . IsValid ( ) )
1540- EngineBrakeController = null ;
1541- BrakemanBrakeController . Initialize ( ) ;
1542- if ( ! BrakemanBrakeController . IsValid ( ) )
1543- BrakemanBrakeController = null ;
1538+ if ( EngineBrakeController != null )
1539+ {
1540+ EngineBrakeController . Initialize ( ) ;
1541+ if ( ! EngineBrakeController . IsValid ( ) )
1542+ EngineBrakeController = null ;
1543+ }
1544+ if ( BrakemanBrakeController != null )
1545+ {
1546+ BrakemanBrakeController . Initialize ( ) ;
1547+ if ( ! BrakemanBrakeController . IsValid ( ) )
1548+ BrakemanBrakeController = null ;
1549+ }
15441550 LocomotivePowerSupply ? . Initialize ( ) ;
15451551 TrainControlSystem . Initialize ( ) ;
15461552 CruiseControl ? . Initialize ( ) ;
You can’t perform that action at this time.
0 commit comments