Thread: avoid taint
View Single Post
11-11-22, 12:56 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,333
My guess is the taint is spreading through CommunitiesFrame:SetDisplayMode() as ToggleGuildFrame() is successfully getting called, but hooksecurefunc() errors because you're giving it invalid arguments. Not to mention it doesn't even do what you're trying to use it for.

hooksecurefunc() allows someone to hook a function without tainting it, it doesn't magically call a function in secure mode. Nothing can do that, otherwise there would be no point in the taint system even existing.



On the more technical side, hooksecurefunc(ToggleGuildFrame()) is processed by first calling ToggleGuildFrame() as if you were trying to call it by itself. This function doesn't return anything (not even nil), so hooksecurefunc() gets called with no values (as would be returned by ToggleGuildFrame()). As explained before, this is where your error is happening. As such, the rest of your code doesn't even run.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 11-11-22 at 01:07 PM.
  Reply With Quote