diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-10-11 11:22:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 11:22:35 +0200 |
commit | b6a5620cd323768c188d01d80432a8994927ea93 (patch) | |
tree | 6d5915ffff2f58472e83b4fb3e9884d611631f68 | |
parent | d65c4916ceaeed6eec5fe3f344d4e71b3c96a80b (diff) | |
download | advtrains-b6a5620cd323768c188d01d80432a8994927ea93.tar.gz advtrains-b6a5620cd323768c188d01d80432a8994927ea93.tar.bz2 advtrains-b6a5620cd323768c188d01d80432a8994927ea93.zip |
Fix error cascade due to inexistent drb_dump when debugging is disabled
-rw-r--r-- | advtrains/init.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index 301ff89..6255780 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -37,7 +37,9 @@ function advtrains.pcall(fun) advtrains.dumppath(train.path) atwarn("Dumping last debug outputs: ", err) atprint("Train state: index",train.index,"end_index", train.end_index,"| max_iot", train.max_index_on_track, "min_iot", train.min_index_on_track, "<> pe_min", train.path_extent_min,"pe_max", train.path_extent_max) - advtrains.drb_dump(advtrains.atprint_context_tid) + if minetest.settings:get_bool("advtrains_enable_debugging") then + advtrains.drb_dump(advtrains.atprint_context_tid) + end end atwarn("Lua Error occured: ", err) atwarn(debug.traceback()) |