aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-10-17 17:45:51 +0200
committerorwell96 <orwell@bleipb.de>2018-10-17 17:45:51 +0200
commitc6bef1c358af39c25e0def8aa374e4474a6e334c (patch)
tree7096e7ed4baa06d191154b27d0bf673cc813d5f5 /advtrains
parent87621caf1f684e66e5b7768859260c7aff66dc6b (diff)
downloadadvtrains-c6bef1c358af39c25e0def8aa374e4474a6e334c.tar.gz
advtrains-c6bef1c358af39c25e0def8aa374e4474a6e334c.tar.bz2
advtrains-c6bef1c358af39c25e0def8aa374e4474a6e334c.zip
Fix H#69
Cause was a cascaded crash, original cause was something different
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/path.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains/path.lua b/advtrains/path.lua
index 5c3db94..3250d7e 100644
--- a/advtrains/path.lua
+++ b/advtrains/path.lua
@@ -122,6 +122,10 @@ end
-- Prints a path using the passed print function
-- This function should be 'atprint', 'atlog', 'atwarn' or 'atdebug', because it needs to use print_concat_table
function advtrains.path_print(train, printf)
+ if not train.path then
+ printf("path_print: Path is invalidated/inexistant.")
+ return
+ end
printf("i: CP Position Dir CN ->Dist->")
for i = train.path_ext_b, train.path_ext_f do
if i==train.path_trk_b then