add nil check for lightning staff pos

This commit is contained in:
tenplus1 2021-07-10 18:54:49 +01:00
parent f6e0c45b15
commit abc57a64fb

@ -256,6 +256,8 @@ minetest.register_tool("lucky_block:lightning_staff", {
pos = pointed_thing.above
end
if not pos then return end
local bnod = pos and minetest.get_node_or_nil(pos)
local bref = bnod and minetest.registered_items[bnod.name]