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 da10def commit dc286f5Copy full SHA for dc286f5
Source/Orts.Simulation/Common/Scripting/PowerSupply/ControlCarPowerSupply.cs
@@ -51,11 +51,11 @@ protected override void SetCurrentElectricTrainSupplyState(PowerSupplyState stat
51
protected override void SetCurrentDynamicBrakeAvailability(bool avail) {}
52
public void SignalEventToControlActiveLocomotive(PowerSupplyEvent evt)
53
{
54
- ControlActiveLocomotive.LocomotivePowerSupply.HandleEvent(evt);
+ ControlActiveLocomotive?.LocomotivePowerSupply.HandleEvent(evt);
55
}
56
public void SignalEventToControlActiveLocomotive(PowerSupplyEvent evt, int id)
57
58
- ControlActiveLocomotive.LocomotivePowerSupply.HandleEvent(evt, id);
+ ControlActiveLocomotive?.LocomotivePowerSupply.HandleEvent(evt, id);
59
60
61
0 commit comments