# HG changeset patch # User Zerotorescue # Date 1287233088 -7200 # Node ID 6a51405c77336300e3e302a718b941bc998fcac6 # Parent fa413243f1b29f94764363e3bbc87791becb872e Hopefully fixed hooking errors (I can?t reproduce them, but this should still solve it). diff -r fa413243f1b2 -r 6a51405c7733 Modules/BeanCounterSupport.lua --- a/Modules/BeanCounterSupport.lua Wed Oct 13 15:41:22 2010 +0200 +++ b/Modules/BeanCounterSupport.lua Sat Oct 16 14:44:48 2010 +0200 @@ -45,8 +45,10 @@ refMonitoredFrame = InboxCloseButton; - -- Hook the OnHide of refMonitoredFrame indicating BeanCounter has started - self:HookScript(refMonitoredFrame, "OnHide", "BeanCounterActivated"); + if not self:IsHooked(refMonitoredFrame, "OnHide") then + -- Hook the OnHide of refMonitoredFrame indicating BeanCounter has started + self:HookScript(refMonitoredFrame, "OnHide", "BeanCounterActivated"); + end end function mod:MAIL_CLOSED() @@ -75,8 +77,10 @@ -- Unhook the current hook (and reapply it after the OnShow was triggered) self:Unhook(refMonitoredFrame, "OnHide"); - -- Hook the OnShow of refMonitoredFrame indicating BeanCounter is finished - self:HookScript(refMonitoredFrame, "OnShow", "BeanCounterDeactivated"); + if not self:IsHooked(refMonitoredFrame, "OnShow") then + -- Hook the OnShow of refMonitoredFrame indicating BeanCounter is finished + self:HookScript(refMonitoredFrame, "OnShow", "BeanCounterDeactivated"); + end MailAddonBusy = MailAddonName; end @@ -92,8 +96,10 @@ -- Unhook the current hook (and reapply it after the OnHide was triggered) self:Unhook(refMonitoredFrame, "OnShow"); - -- Hook the OnHide of the refMonitoredFrame again which is trigged when BeanCounter starts - self:HookScript(refMonitoredFrame, "OnHide", "BeanCounterActivated"); + if not self:IsHooked(refMonitoredFrame, "OnHide") then + -- Hook the OnHide of the refMonitoredFrame again which is trigged when BeanCounter starts + self:HookScript(refMonitoredFrame, "OnHide", "BeanCounterActivated"); + end if MailAddonBusy == MailAddonName then MailAddonBusy = nil;