Skip to content

Commit

Permalink
Check for empty spells (Fixes #194)
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed Jan 3, 2025
1 parent 9c62081 commit f1ed1f8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions RatingBuster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1653,8 +1653,10 @@ do
local sourceSpell = case.aura or case.glyph or case.known or case.spellid
if sourceSpell then
local sourceSpellInfo = C_Spell.GetSpellInfo(sourceSpell)
name = sourceSpellInfo.name
icon = sourceSpellInfo.iconID
if sourceSpellInfo then
name = sourceSpellInfo.name
icon = sourceSpellInfo.iconID
end
elseif case.tab then
name, icon = StatLogic:GetOrderedTalentInfo(case.tab, case.num)
elseif case.set then
Expand Down Expand Up @@ -1733,9 +1735,11 @@ do
spellId = C_Spell.GetSpellIDForSpellIdentifier(name) or spellId
end
local spell = Spell:CreateFromSpellID(spellId)
spell:ContinueOnSpellLoad(function()
option.desc = spell:GetSpellDescription()
end)
if not spell:IsSpellEmpty() then
spell:ContinueOnSpellLoad(function()
option.desc = spell:GetSpellDescription()
end)
end
end
end
end
Expand Down

0 comments on commit f1ed1f8

Please sign in to comment.