diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-03-11 12:59:02 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-03-11 13:00:16 -0400 |
commit | c9b64206f9cc4f9332cc903816799fcafb4fb7c9 (patch) | |
tree | ec1d4aeb337ad0df59e5886b7b2acc29ecf1e2f8 | |
parent | 859287b02710723fcce5a35741a5afb242184679 (diff) | |
download | minetest-c9b64206f9cc4f9332cc903816799fcafb4fb7c9.tar.gz minetest-c9b64206f9cc4f9332cc903816799fcafb4fb7c9.tar.bz2 minetest-c9b64206f9cc4f9332cc903816799fcafb4fb7c9.zip |
Fix error when calling minetest.node_punch without a pointed_thing
-rw-r--r-- | builtin/item.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/item.lua b/builtin/item.lua index de546c2e7..002c14f5e 100644 --- a/builtin/item.lua +++ b/builtin/item.lua @@ -367,7 +367,7 @@ function minetest.node_punch(pos, node, puncher, pointed_thing) -- Copy pos and node because callback can modify them local pos_copy = vector.new(pos) local node_copy = {name=node.name, param1=node.param1, param2=node.param2} - local pointed_thing_copy = copy_pointed_thing(pointed_thing) + local pointed_thing_copy = pointed_thing and copy_pointed_thing(pointed_thing) or nil callback(pos_copy, node_copy, puncher, pointed_thing_copy) end end |