From 0617a6a1bd936f3553d027e248b5bb10f0d6d65f Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 22 Jan 2019 17:47:43 +0100 Subject: Fix may_modify_section on newly created sections --- advtrains_interlocking/database.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua index af20bea..4aaa4c4 100644 --- a/advtrains_interlocking/database.lua +++ b/advtrains_interlocking/database.lua @@ -447,7 +447,7 @@ end -- - merging and dissolving sections -- As of now the action will be denied if a route is set or if a train is in the section. function ildb.may_modify_ts(ts) - if ts.route or ts.route_post or #ts.trains>0 then + if ts.route or ts.route_post or (ts.trains and #ts.trains>0) then return false end return true -- cgit v1.2.3