aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/atc_rail.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_luaautomation/atc_rail.lua')
-rw-r--r--advtrains_luaautomation/atc_rail.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/advtrains_luaautomation/atc_rail.lua b/advtrains_luaautomation/atc_rail.lua
index 2d6efe5..b862129 100644
--- a/advtrains_luaautomation/atc_rail.lua
+++ b/advtrains_luaautomation/atc_rail.lua
@@ -201,7 +201,10 @@ advtrains.register_tracks("default", {
--set arrowconn (for ATC)
local ph=minetest.pos_to_string(pos)
local _, conns=advtrains.get_rail_info_at(pos, advtrains.all_tracktypes)
- atlatc.active.nodes[ph].arrowconn=conns[1].c
+ local nodeent = atlatc.active.nodes[ph]
+ if nodeent then
+ nodeent.arrowconn=conns[1].c
+ end
end,
advtrains = {