From 09bba2c57fcf3907d9e761d15526f1d9a9a91a13 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Sun, 25 Apr 2021 21:59:02 +0200 Subject: Hopefully fix #177 --- advtrains_luaautomation/atc_rail.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 = { -- cgit v1.2.3