aboutsummaryrefslogtreecommitdiff
path: root/advtrains/advtrains_luaautomation/active_common.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-02-05 22:54:31 +0100
committerorwell96 <mono96.mml@gmail.com>2017-02-05 22:54:31 +0100
commit3f54727e4ff54c864ccffe6faeeec4fd089c14ca (patch)
treeaec5290ad44edff629c3608516e1494581954ab0 /advtrains/advtrains_luaautomation/active_common.lua
parentd84c23f0845982e3011eadcd56ee7ded36992726 (diff)
downloadadvtrains-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.
Diffstat (limited to 'advtrains/advtrains_luaautomation/active_common.lua')
-rw-r--r--advtrains/advtrains_luaautomation/active_common.lua2
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