View Single Post
05/22/14, 08:17 PM   #10
Aiiane
 
Aiiane's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 19
Here's the function in question:

Code:
local function OnActiveWeaponPairChanged(event, activeWeaponPair)
    if(not ComparativeTooltip1:IsHidden() or not ComparativeTooltip2:IsHidden()) then
        local tooltipAttachedTo = ComparativeTooltip1:GetOwner()
        if tooltipAttachedTo then
            ZO_InventorySlot_OnMouseEnter(tooltipAttachedTo:GetOwner())
        end
    end
end
ZO_InventorySlot_OnMouseEnter passes its argument directly to GetInventorySlotComponents, which then indexes it directly (which fails).

So basically, the problem manifests when ComparitiveTooltip1:GetOwner() is non-nil, but ComparitiveTooltip1:GetOwner():GetOwner() is nil - that is, when ComparitiveTooltip1 has an owner but not a grand-owner. I haven't dived into the tooltip codepath enough to determine whether the bug is that the code isn't checking for a grandparent first, or if there should always be a grandparent and something isn't updating it.

The reason why setting the comparitive tooltips to hidden "fixes" the problem is obvious - the entire codepath is skipped if the comparitive tooltips aren't visible.

Last edited by Aiiane : 05/22/14 at 08:22 PM.
  Reply With Quote