Make sure the MainPanel exists before trying to reposition it. Fixes ticket #1038.
James D. Callahan III [07-13-10 - 06:29]
Make sure the MainPanel exists before trying to reposition it. Fixes ticket #1038.
diff --git a/Config.lua b/Config.lua
index 13fe6ac..6529614 100644
--- a/Config.lua
+++ b/Config.lua
@@ -36,8 +36,7 @@ end
local function ResetGUI()
local options = addon.db.profile.frameopts
-
- addon.Frame:Hide()
+ local MainPanel = addon.Frame
options.offsetx = 0
options.offsety = 0
@@ -46,7 +45,10 @@ local function ResetGUI()
options.uiscale = 1
options.small_list_font = true
- addon.Frame:Show()
+ if MainPanel then
+ MainPanel:Hide()
+ MainPanel:Show()
+ end
end
local options