diff --git a/Altoholic/Altoholic.toc b/Altoholic/Altoholic.toc index 4ab39a4..850bbe9 100644 --- a/Altoholic/Altoholic.toc +++ b/Altoholic/Altoholic.toc @@ -13,7 +13,7 @@ ## Author: Thaoky, Telkar-RG ## X-Edited-By: Exiles (Sub-Net) — florian.berthold@sub-net.at -## Version: 3.3.002b-coa.15 +## Version: 3.3.002b-coa.16 ## X-Category: Inventory, Tradeskill, Mail ## X-Localizations: enUS, frFR, zhCN, zhTW, deDE, koKR, esES, esMX, ruRU ## X-Website: http://wow.curse.com/downloads/wow-addons/details/altoholic.aspx diff --git a/Altoholic/Frames/Talents.lua b/Altoholic/Frames/Talents.lua index 6d83670..1da5856 100644 --- a/Altoholic/Frames/Talents.lua +++ b/Altoholic/Frames/Talents.lua @@ -337,6 +337,7 @@ function tns:Update(treeIndex) -- textures are 90.625% of the original size local _, bg = DS:GetTreeInfo(class, treeName) + if not bg then return end -- CoA: no talent-tree background for this class (e.g. custom class with no reference data) AltoholicFrameTalents_bgTopLeft:SetTexture(bg.."-TopLeft") AltoholicFrameTalents_bgTopRight:SetTexture(bg.."-TopRight") AltoholicFrameTalents_bgBottomLeft:SetTexture(bg.."-BottomLeft") diff --git a/DataStore_Talents/DataStore_Talents.lua b/DataStore_Talents/DataStore_Talents.lua index d0fb5e6..430231b 100644 --- a/DataStore_Talents/DataStore_Talents.lua +++ b/DataStore_Talents/DataStore_Talents.lua @@ -239,9 +239,12 @@ local function _GetClassReference(class) end local function _GetTreeReference(class, tree) - assert(type(class) == "string") - assert(type(tree) == "string") - return addon.ref.global[class].Trees[tree] + -- CoA: custom classes (MONK, etc.) may have no/partial talent reference data, so a + -- tree lookup can arrive with a nil tree name. Degrade to nil instead of asserting. + if type(class) ~= "string" or type(tree) ~= "string" then return end + local c = addon.ref.global[class] + if not c or not c.Trees then return end + return c.Trees[tree] end local function _IsClassKnown(class)