From f1ed1f8040a66232f58fae48da2701fd460b1ea8 Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Thu, 2 Jan 2025 23:08:44 -0600 Subject: [PATCH] Check for empty spells (Fixes #194) --- RatingBuster.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/RatingBuster.lua b/RatingBuster.lua index a2639d6..7ff12c4 100644 --- a/RatingBuster.lua +++ b/RatingBuster.lua @@ -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 @@ -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