Skip to content

Commit

Permalink
Check for nil tooltip owner
Browse files Browse the repository at this point in the history
  • Loading branch information
raethkcj committed May 20, 2023
1 parent 4c4cdb0 commit 2c375a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RatingBuster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1718,14 +1718,14 @@ local ITEM_MIN_LEVEL_PATTERN = ITEM_MIN_LEVEL:gsub("%%d", "%%d+")
local BIND_TRADE_PATTERN = BIND_TRADE_TIME_REMAINING:gsub("%%s", ".*")
local BEGIN_ITEM_SPELL_TRIGGER_ONUSE = "^" .. ITEM_SPELL_TRIGGER_ONUSE

local scanningParents = {
local scanningTooltipOwners = {
["WorldFrame"] = true,
["UIParent"] = true,
}

function RatingBuster.ProcessTooltip(tooltip, name, link)
-- Do nothing if the tooltip is being used as a hidden scanning tooltip
if tooltip:GetAnchorType() == "ANCHOR_NONE" and scanningParents[tooltip:GetOwner():GetName()] then
if tooltip:GetAnchorType() == "ANCHOR_NONE" and (not tooltip:GetOwner() or scanningTooltipOwners[tooltip:GetOwner():GetName()]) then
return
end

Expand Down

0 comments on commit 2c375a4

Please sign in to comment.