added meta nil check

This commit is contained in:
TenPlus1 2018-07-03 13:35:00 +01:00
parent 534364e9c3
commit 3331132a4b
1 changed files with 4 additions and 0 deletions

View File

@ -530,6 +530,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local pos = minetest.string_to_pos(pos_s)
local meta = minetest.get_meta(pos)
if not meta then
return
end
-- only owner can add names
if not protector.can_dig(1, pos, player:get_player_name(), true, 1) then
return