Fixes the doubling
Kevin Lyles [09-17-09 - 03:57]
Fixes the doubling
two WeightsWatcher objects were being created previously
once when WeightsWatcher.xml loaded its script file (WeightsWatcher.lua)
once when WeightsWatcher.lua was loaded (from the toc)
diff --git a/WeightsWatcher.lua b/WeightsWatcher.lua
index 9902952..0d8c4c7 100644
--- a/WeightsWatcher.lua
+++ b/WeightsWatcher.lua
@@ -1,4 +1,6 @@
-WeightsWatcher = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceHook-2.1")
+if not WeightsWatcher then
+ WeightsWatcher = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceHook-2.1")
+end
function WeightsWatcher:OnInitialize()