Skip to content

Commit 3f28f21

Browse files
committed
Fix a potential Lua error in talent selection
1 parent 0179298 commit 3f28f21

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The format of this changelog is based on [Keep a Changelog](https://keepachangel
1313
### Fixed
1414

1515
* Fix Lua error on Classic flavors due to `issecretvalue` missing
16+
* Fix a potential Lua error related to talent selection
1617

1718
## [1.17.2] - 2026-01-23
1819

Clicked/Core/LocaleUtils.lua

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,19 @@ local function GetTalentsForSpecialization(specId)
134134
if node ~= nil and node.ID ~= 0 then
135135
for _, talentId in ipairs(node.entryIDs) do
136136
local entryInfo = C_Traits.GetEntryInfo(configId, talentId)
137-
local definitionInfo = C_Traits.GetDefinitionInfo(entryInfo.definitionID)
138-
local spellName = Addon:StripColorCodes(TalentUtil.GetTalentNameFromInfo(definitionInfo))
139-
140-
if not Addon:IsNilOrEmpty(spellName) then
141-
table.insert(allTalents[specId], {
142-
spellId = definitionInfo.spellID,
143-
text = spellName,
144-
icon = TalentButtonUtil.CalculateIconTexture(definitionInfo),
145-
specId = specId
146-
})
137+
138+
if entryInfo.definitionID ~= nil then
139+
local definitionInfo = C_Traits.GetDefinitionInfo(entryInfo.definitionID)
140+
local spellName = Addon:StripColorCodes(TalentUtil.GetTalentNameFromInfo(definitionInfo))
141+
142+
if not Addon:IsNilOrEmpty(spellName) and definitionInfo.spellID ~= nil then
143+
table.insert(allTalents[specId], {
144+
spellId = definitionInfo.spellID,
145+
text = spellName,
146+
icon = TalentButtonUtil.CalculateIconTexture(definitionInfo),
147+
specId = specId
148+
})
149+
end
147150
end
148151
end
149152
end

0 commit comments

Comments
 (0)