mirror of
https://github.com/mt-mods/currency.git
synced 2024-12-02 00:43:44 +01:00
stop crash if player is nil when digging a safe
This commit is contained in:
parent
d52512a89f
commit
ea81baaed8
2
safe.lua
2
safe.lua
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user