Skip to content

Commit

Permalink
Fix #1858 - crash when adding a modifier to a jewel
Browse files Browse the repository at this point in the history
This is the same issue as was fixed in abyss jewels in 9d42348. If there
are no options in the crafting table, the "crafting table" option needs
to be hidden, or there will be an error when trying to create the
tooltip.

For good measure, this patch also prevents the crash by checking that
there's something in listMod before dereferencing it.
  • Loading branch information
dcollinsn committed Mar 10, 2020
1 parent b897f1b commit 1501bc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ function ItemsTabClass:AddCustomModifierToDisplayItem()
end)
end
end
if (self.build.targetVersion ~= "2_6" and self.displayItem.base.subType ~= "Abyss") or (self.displayItem.type ~= "Jewel" and self.displayItem.type ~= "Flask") then
if (self.build.targetVersion ~= "2_6" and self.displayItem.type ~= "Jewel") or (self.displayItem.type ~= "Jewel" and self.displayItem.type ~= "Flask") then
t_insert(sourceList, { label = "Crafting Bench", sourceId = "MASTER" })
end
if self.displayItem.type ~= "Jewel" and self.displayItem.type ~= "Flask" then
Expand Down

0 comments on commit 1501bc5

Please sign in to comment.