mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-22 23:25:15 +02:00
Add guard that prevents crash when itemstack is nil
This commit is contained in:
parent
ee49ff612d
commit
9ef2e02463
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue