Check that player inventory returns a valid table

此提交包含在:
stujones11
2017-10-20 20:17:37 +01:00
父節點 d979815a49
當前提交 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()