Add guard that prevents crash when itemstack is nil
This commit is contained in:
parent
a9e1c5ad19
commit
26c034b985
|
@ -18,7 +18,7 @@ function mod.convert_inventory_lists(lists)
|
||||||
for _,list in pairs(lists) do
|
for _,list in pairs(lists) do
|
||||||
for i = 1,#list do
|
for i = 1,#list do
|
||||||
local itemstack = list[i]
|
local itemstack = list[i]
|
||||||
local conversion = item_conversions[itemstack:get_name()]
|
local conversion = itemstack and item_conversions[itemstack:get_name()]
|
||||||
if conversion then
|
if conversion then
|
||||||
local new_name,func = conversion[1],conversion[2]
|
local new_name,func = conversion[1],conversion[2]
|
||||||
if func then
|
if func then
|
||||||
|
|
Loading…
Reference in New Issue