Skip to content

Commit

Permalink
add more checks to prevent access errors (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordonwow committed Apr 6, 2022
1 parent 839e754 commit f56d441
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions BigDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1479,9 +1479,9 @@ if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then

hooksecurefunc("CompactUnitFrame_UpdateAuras", function(frame, isFullUpdate, updatedAuraInfos)

if ((not frame) or frame:IsForbidden()) then
return
end
if (not frame) or frame:IsForbidden() then return end

if (not UnitIsPlayer(frame.displayedUnit)) then return end

local displayOnlyDispellableDebuffs = frame.optionTable.displayOnlyDispellableDebuffs;

Expand Down Expand Up @@ -2247,6 +2247,7 @@ function BigDebuffs:NAME_PLATE_UNIT_ADDED(_, unit)
frame.BigDebuffs.cooldown:SetReverse(true)

frame.BigDebuffs:SetScript("OnEnter", function(self)
if NamePlateTooltip:IsForbidden() then return end
if ( BigDebuffs.db.profile.nameplates.tooltips ) then
NamePlateTooltip:SetOwner(self, "ANCHOR_RIGHT", 0, 0);
if self.interrupt then
Expand All @@ -2262,6 +2263,7 @@ function BigDebuffs:NAME_PLATE_UNIT_ADDED(_, unit)
end)

frame.BigDebuffs:SetScript("OnLeave", function()
if NamePlateTooltip:IsForbidden() then return end
NamePlateTooltip:Hide()
end)
end
Expand Down

0 comments on commit f56d441

Please sign in to comment.