Skip to content

Commit

Permalink
Merge pull request #790 from Roeterdink/CrashInTrainCar
Browse files Browse the repository at this point in the history
Correct crash in TrainCar.cs
  • Loading branch information
cjakeman committed Feb 27, 2023
2 parents 5d9debb + 36a9921 commit 94da787
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1768,7 +1768,7 @@ public string GetCurveDirection()
public virtual void UpdateCurveSpeedLimit()
{
float s = AbsSpeedMpS; // speed of train
var train = Simulator.PlayerLocomotive.Train;//Debrief Eval
var train = Simulator.PlayerLocomotive != null ? Simulator.PlayerLocomotive.Train : null;//Debrief Eval (timetable train can exist without engine)

// get curve radius

Expand Down

0 comments on commit 94da787

Please sign in to comment.