From d27eb853bf5ff3abb5613df9701c11b70b2f109c Mon Sep 17 00:00:00 2001 From: ImUnicke Date: Wed, 14 Aug 2024 15:03:56 -0600 Subject: [PATCH] Retail: Fixed a Lua error where some Professions failed to render an icon (fixes #1728) --- AllTheThings.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AllTheThings.lua b/AllTheThings.lua index 22330ae6d03..1938f99a4c6 100644 --- a/AllTheThings.lua +++ b/AllTheThings.lua @@ -6548,7 +6548,12 @@ local fields = { return t.spellID ~= 2366 and GetSpellName(t.spellID) or C_TradeSkillUI.GetTradeSkillDisplayName(t.professionID); end, ["icon"] = function(t) - return GetSpellIcon(t.spellID) or C_TradeSkillUI.GetTradeSkillTexture(t.professionID); + local icon + local spellID = t.spellID + if spellID then + icon = GetSpellIcon(spellID) + end + return icon or C_TradeSkillUI.GetTradeSkillTexture(t.professionID); end, ["spellID"] = function(t) return app.SkillIDToSpellID[t.professionID];