Add guard that prevents crash when itemstack is nil

This commit is contained in:
teknomunk 2024-08-31 16:44:19 -05:00 committed by the-real-herowl
parent ee49ff612d
commit 9ef2e02463

View File

@ -18,7 +18,7 @@ function mod.convert_inventory_lists(lists)
for _,list in pairs(lists) do
for i = 1,#list do
local itemstack = list[i]
local conversion = item_conversions[itemstack:get_name()]
local conversion = itemstack and item_conversions[itemstack:get_name()]
if conversion then
local new_name,func = conversion[1],conversion[2]
if func then