diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-10-23 14:31:37 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2015-10-23 14:31:37 -0400 |
commit | ea81baaed8da061be98cd6787d5e4504d637dff7 (patch) | |
tree | 26f06fa14be1ac549df008c92e764aa223a385c0 | |
parent | d52512a89ff83d0167ea386c5eabd9cea3cd8df1 (diff) |
stop crash if player is nil when digging a safe
-rw-r--r-- | safe.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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
|