Commit 6b152a93 authored by Robin Schoonover's avatar Robin Schoonover

Check for script handler before hooking it.

parent 6c287e9f
......@@ -26,9 +26,14 @@ function addon:AddIDLine(tip, ...) -- idname, id
end
end
function addon:HookTipScript(...)
GameTooltip:HookScript(...)
ItemRefTooltip:HookScript(...)
function addon:HookTipScript(handler, func)
if GameTooltip:HasScript(handler) then
GameTooltip:HookScript(handler, func)
end
if ItemRefTooltip:HasScript(handler) then
ItemRefTooltip:HookScript(handler, func)
end
end
function addon:HookTip(method, hookfunc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment