Skip to content

Commit 36a9921

Browse files
committed
Correct crash in TrainCar.cs
1 parent 3ffb9bc commit 36a9921

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ public string GetCurveDirection()
17681768
public virtual void UpdateCurveSpeedLimit()
17691769
{
17701770
float s = AbsSpeedMpS; // speed of train
1771-
var train = Simulator.PlayerLocomotive.Train;//Debrief Eval
1771+
var train = Simulator.PlayerLocomotive != null ? Simulator.PlayerLocomotive.Train : null;//Debrief Eval (timetable train can exist without engine)
17721772

17731773
// get curve radius
17741774

0 commit comments

Comments
 (0)