From 1501bc593000a5a83aca719dbdfdbba12ed68d48 Mon Sep 17 00:00:00 2001 From: Dan Collins Date: Tue, 10 Mar 2020 18:17:25 -0400 Subject: [PATCH] Fix #1858 - crash when adding a modifier to a jewel 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. --- Classes/ItemsTab.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/ItemsTab.lua b/Classes/ItemsTab.lua index 5f2ff691b..b5e556872 100644 --- a/Classes/ItemsTab.lua +++ b/Classes/ItemsTab.lua @@ -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