forked from mtcontrib/3d_armor
Check that player inventory returns a valid table
This commit is contained in:
parent
d979815a49
commit
d5896a04e2
@ -199,7 +199,10 @@ armor.set_player_armor = function(self, player)
|
||||
change[group] = 1
|
||||
levels[group] = 0
|
||||
end
|
||||
local list = player_inv:get_list("armor") or {}
|
||||
local list = player_inv:get_list("armor")
|
||||
if type(list) ~= "table" then
|
||||
return
|
||||
end
|
||||
for i, stack in pairs(list) do
|
||||
if stack:get_count() == 1 then
|
||||
local def = stack:get_definition()
|
||||
|
Loading…
Reference in New Issue
Block a user