prevent crash when a non-player object digs a node

This commit is contained in:
FaceDeer 2019-08-05 09:01:27 -06:00
parent 1ffa8f10ac
commit a0b232aa2b

@ -152,7 +152,9 @@ function awards.register_trigger(tname, tdef)
end end
end end
assert(player and player.is_player and player:is_player() and key) if not (player and player.is_player and player:is_player() and key) then
return
end
local name = player:get_player_name() local name = player:get_player_name()
local data = awards.player(name) local data = awards.player(name)