diff --git a/storage/itemstack.lua b/storage/itemstack.lua index 6eb57b5..8f545ef 100644 --- a/storage/itemstack.lua +++ b/storage/itemstack.lua @@ -133,7 +133,8 @@ function ItemStack:getSimpleName() return simpleName end - return self:getInventory():getName().."["..self:getSlot().."]" + local inventory = self:getInventory() + return (((inventory and inventory:getName()) or inventory and "[UNKNOWN_INV]") or "[NO_INV]").."["..(self:getSlot() or "NO_SLOT").."]" end function ItemStack:hasChanged(listObj, thorough)