Add guard that prevents crash when itemstack is nil

This commit is contained in:
teknomunk 2024-08-31 16:44:19 -05:00
parent a9e1c5ad19
commit 26c034b985
1 changed files with 1 additions and 1 deletions

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