aboutsummaryrefslogtreecommitdiff
path: root/advtrains/atc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/atc.lua')
-rw-r--r--advtrains/atc.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/advtrains/atc.lua b/advtrains/atc.lua
index 465a0ec..00cfde1 100644
--- a/advtrains/atc.lua
+++ b/advtrains/atc.lua
@@ -32,6 +32,9 @@ function atc.send_command(pos, par_tid)
atc.train_reset_command(train_id)
local arrowconn=atc.controllers[pts].arrowconn
local train=advtrains.trains[train_id]
+ if train.path == nil then
+ return
+ end
for index, ppos in pairs(train.path) do
if vector.equals(advtrains.round_vector_floor_y(ppos), pos) then
advtrains.trains[train_id].atc_arrow =