diff options
author | orwell96 <orwell@bleipb.de> | 2018-10-29 21:19:49 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-10-29 21:19:49 +0100 |
commit | 93726db4e3c36878981b5eb934b3599a50bc6619 (patch) | |
tree | cc0a5d5db9589bcd026b671f6d1f7f81b218aa02 /advtrains/atc.lua | |
parent | 6298f8b081fd0fa05552f2b658281b0e6e950d38 (diff) | |
download | advtrains-93726db4e3c36878981b5eb934b3599a50bc6619.tar.gz advtrains-93726db4e3c36878981b5eb934b3599a50bc6619.tar.bz2 advtrains-93726db4e3c36878981b5eb934b3599a50bc6619.zip |
Handle the case that a train is not initialized (train_ensure_init returns nil/false)
Fixes H#72
Diffstat (limited to 'advtrains/atc.lua')
-rw-r--r-- | advtrains/atc.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/advtrains/atc.lua b/advtrains/atc.lua index 40809d2..5adacf3 100644 --- a/advtrains/atc.lua +++ b/advtrains/atc.lua @@ -199,6 +199,7 @@ local matchptn={ if train.velocity<=0 then advtrains.invert_train(id) advtrains.train_ensure_init(id, train) + -- no one minds if this failed... this shouldn't even be called without train being initialized... else atwarn(sid(id), attrans("ATC Reverse command warning: didn't reverse train, train moving!")) end |