mirror of
https://github.com/mt-mods/currency.git
synced 2024-11-26 06:13: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
|
||||
|
||||
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
|
||||
end
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user