Skip to content

Commit

Permalink
be more careful about getting tooltip data
Browse files Browse the repository at this point in the history
since C_Tooltip functions complain when given nil
  • Loading branch information
emptyrivers committed Nov 26, 2024
1 parent 74adb19 commit 5bfb2a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4603,10 +4603,10 @@ function GenericTrigger.SetToolTip(trigger, state)
local prototype = GenericTrigger.GetPrototype(trigger)
if prototype then
if prototype.hasSpellID then
GameTooltip:SetSpellByID(trigger.spellName);
GameTooltip:SetSpellByID(trigger.spellName or 0);
return true
elseif prototype.hasItemID then
GameTooltip:SetHyperlink("item:"..trigger.itemName..":0:0:0:0:0:0:0")
GameTooltip:SetHyperlink("item:"..(trigger.itemName or 0)..":0:0:0:0:0:0:0")
return true
end
end
Expand Down

0 comments on commit 5bfb2a7

Please sign in to comment.