diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-02-05 22:54:31 +0100 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-02-05 22:54:31 +0100 |
commit | 3f54727e4ff54c864ccffe6faeeec4fd089c14ca (patch) | |
tree | aec5290ad44edff629c3608516e1494581954ab0 | |
parent | d84c23f0845982e3011eadcd56ee7ded36992726 (diff) | |
download | advtrains-3f54727e4ff54c864ccffe6faeeec4fd089c14ca.tar.gz advtrains-3f54727e4ff54c864ccffe6faeeec4fd089c14ca.tar.bz2 advtrains-3f54727e4ff54c864ccffe6faeeec4fd089c14ca.zip |
Check if node is actually loaded before querying get_meta()
Known to cause a segfault in engine sometimes.
-rw-r--r-- | advtrains/advtrains_luaautomation/active_common.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/advtrains_luaautomation/active_common.lua b/advtrains/advtrains_luaautomation/active_common.lua index 0351c85..0b13a51 100644 --- a/advtrains/advtrains_luaautomation/active_common.lua +++ b/advtrains/advtrains_luaautomation/active_common.lua @@ -96,7 +96,7 @@ function ac.run_in_env(pos, evtdata, customfct_p) end local meta - if minetest.get_node(pos) then + if minetest.get_node_or_nil(pos) then meta=minetest.get_meta(pos) end |