diff Core.lua @ 135:9998d4ff8152

A C stack overflow when clicking the mail opener options in the interface -> addons tab should no longer occur.
author Zerotorescue
date Fri, 12 Nov 2010 17:57:05 +0100
parents 27d81641c1e7
children debff5ad3de4
line wrap: on
line diff
--- 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);