stop crash if player is nil when digging a safe

This commit is contained in:
Vanessa Ezekowitz 2015-10-23 14:31:37 -04:00
parent d52512a89f
commit ea81baaed8

@ -8,7 +8,7 @@ function default.get_safe_formspec(pos)
end end
local function has_safe_privilege(meta, player) local function has_safe_privilege(meta, player)
if player:get_player_name() ~= meta:get_string("owner") then if not player or player:get_player_name() ~= meta:get_string("owner") then
return false return false
end end
return true return true