In my opinion this is a bug on ZOS side which was introduced in patch 1.5.6 because of changes in crafting UI.
Unfortunately this error occurs in local function, so it will be a bit difficult to fix by addon.
I'd probably try to redefine GetMaterialQuantity function, something like:
Lua Code:
function ZO_SharedSmithingCreation:GetMaterialQuantity(patternIndex, materialIndex)
local quantity
if self.selectedMaterialCountCache[patternIndex] then
quantity = self.selectedMaterialCountCache[patternIndex][materialIndex]
end
if quantity == nil then
local _, _, stack = GetSmithingPatternMaterialItemInfo(patternIndex, materialIndex)
self:SetMaterialQuantity(patternIndex, materialIndex, stack)
quantity = stack
end
return quantity or 0
end
Or if you want to redefine just instance of this class, you are looking for function:
Code:
SMITHING.creationPanel:GetMaterialQuantity(patternIndex, materialIndex)