diff --git a/ElvUI_Libraries/Core/oUF/elements/castbar.lua b/ElvUI_Libraries/Core/oUF/elements/castbar.lua index ee4273a909..ca41b88782 100644 --- a/ElvUI_Libraries/Core/oUF/elements/castbar.lua +++ b/ElvUI_Libraries/Core/oUF/elements/castbar.lua @@ -241,13 +241,15 @@ local function CastStart(self, real, unit, castGUID, spellID, castTime) if spellID and real == 'UNIT_SPELLCAST_SENT' then name, _, texture, castDuration = oUF:GetSpellInfo(spellID) - if castDuration and castDuration ~= 0 then - castTime = castDuration -- prefer a real duration time, otherwise use the static duration - end + if name then + if castDuration and castDuration ~= 0 then + castTime = castDuration -- prefer a real duration time, otherwise use the static duration + end - castID = castGUID - startTime = GetTime() * 1000 - endTime = startTime + castTime + castID = castGUID + startTime = GetTime() * 1000 + endTime = startTime + castTime + end else name, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible, spellID = UnitCastingInfo(unit)