# HG changeset patch # User Zerotorescue # Date 1289581025 -3600 # Node ID 9998d4ff8152d61ef0528d037cb0d7df0c3e3357 # Parent 77cd26a69d4f261a2d1dea46ac2afde54618888c A C stack overflow when clicking the mail opener options in the interface -> addons tab should no longer occur. diff -r 77cd26a69d4f -r 9998d4ff8152 Core.lua --- a/Core.lua Wed Oct 20 22:38:40 2010 +0200 +++ b/Core.lua Fri Nov 12 17:57:05 2010 +0100 @@ -146,15 +146,20 @@ local frame = CreateFrame("Frame", nil, UIParent); frame:Hide(); frame.name = "Mail Opener"; + frame.fresh = true; frame:HookScript("OnShow", function(self) - -- Enable the config module - MailOpener:EnableConfigModule(); - - -- Load the options and add it to the blizzard interface list - MailOpenerConfig:Load(); - - -- Refresh the frame to instantly show the right options - InterfaceOptionsFrame_OpenToCategory(self.name) + if self.fresh then + self.fresh = nil; + + -- Enable the config module + MailOpener:EnableConfigModule(); + + -- Load the options and add it to the blizzard interface list + MailOpenerConfig:Load(); + + -- Refresh the frame to instantly show the right options + InterfaceOptionsFrame_OpenToCategory(self.name); + end end); -- And add it to the interface options InterfaceOptions_AddCategory(frame);