aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-04-25 21:59:02 +0200
committerorwell96 <orwell@bleipb.de>2021-04-25 21:59:02 +0200
commit09bba2c57fcf3907d9e761d15526f1d9a9a91a13 (patch)
treed2969437e03fb4bc773945039c597f86a467526d
parent112e3ff2555f1380a5125a9b09ef0a7fc81b053a (diff)
downloadadvtrains-09bba2c57fcf3907d9e761d15526f1d9a9a91a13.tar.gz
advtrains-09bba2c57fcf3907d9e761d15526f1d9a9a91a13.tar.bz2
advtrains-09bba2c57fcf3907d9e761d15526f1d9a9a91a13.zip
Hopefully fix #177
-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 = {