Quantcast

quick patch

Steven Jackson [01-05-15 - 04:14]
quick patch
Filename
Interface/AddOns/SVUI/framework/api/api_general.lua
Interface/AddOns/SVUI/framework/widgets/widget_superbutton.lua
diff --git a/Interface/AddOns/SVUI/framework/api/api_general.lua b/Interface/AddOns/SVUI/framework/api/api_general.lua
index d561d57..659d0b1 100644
--- a/Interface/AddOns/SVUI/framework/api/api_general.lua
+++ b/Interface/AddOns/SVUI/framework/api/api_general.lua
@@ -222,7 +222,7 @@ local function UpdateFontTemplate(template)
     local size = info.size;
     local line = info.outline;
     local list = ManagedFonts[template];
-
+    if(not list) then return end
     for frame in pairs(list) do
         if frame then
             if(frame.___fontOutline) then
diff --git a/Interface/AddOns/SVUI/framework/widgets/widget_superbutton.lua b/Interface/AddOns/SVUI/framework/widgets/widget_superbutton.lua
index afa452a..c199135 100644
--- a/Interface/AddOns/SVUI/framework/widgets/widget_superbutton.lua
+++ b/Interface/AddOns/SVUI/framework/widgets/widget_superbutton.lua
@@ -221,7 +221,7 @@ local SetSuperButtonAction = function(self, action)
 	end

 	local HotKey = self.HotKey
-	local key = GetBindingKey(self.___binding ~= nil)
+	local key = GetBindingKey(self.___binding)
 	if(key) then
 		HotKey:SetText(GetBindingText(key, 1))
 		HotKey:Show()
@@ -309,7 +309,7 @@ local SetSuperButtonSpell = function(self, spellID, spellName, texture)
 	end

 	local HotKey = self.HotKey
-	local key = GetBindingKey(self.___binding ~= nil)
+	local key = GetBindingKey(self.___binding)
 	if(key) then
 		HotKey:SetText(GetBindingText(key, 1))
 		HotKey:Show()
@@ -397,7 +397,7 @@ local SetSuperButtonItem = function(self, itemLink, texture)
 	end

 	local HotKey = self.HotKey
-	local key = GetBindingKey(self.___binding ~= nil)
+	local key = GetBindingKey(self.___binding)
 	if(key) then
 		HotKey:SetText(GetBindingText(key, 1))
 		HotKey:Show()
@@ -579,7 +579,7 @@ function SuperButton:AddAction(buttonName, updateFunc, eventFunc, bindingKey)
 		end
 		if(self:IsShown() and (self.___binding ~= nil) and (name == 'action' or name == 'binding')) then
 			self:ClearBindings()
-			local key = GetBindingKey(self.___binding ~= nil)
+			local key = GetBindingKey(self.___binding)
 			if(key) then
 				self:SetBindingClick(1, key, self, 'LeftButton')
 			end
@@ -688,7 +688,7 @@ function SuperButton:AddSpell(buttonName, updateFunc, eventFunc, bindingKey)
 		end
 		if(self:IsShown() and (self.___binding ~= nil) and (name == 'spell' or name == 'binding')) then
 			self:ClearBindings()
-			local key = GetBindingKey(self.___binding ~= nil)
+			local key = GetBindingKey(self.___binding)
 			if(key) then
 				self:SetBindingClick(1, key, self, 'LeftButton')
 			end
@@ -796,7 +796,7 @@ function SuperButton:AddItem(buttonName, updateFunc, eventFunc, bindingKey)
 		end
 		if(self:IsShown() and (self.___binding ~= nil) and (name == 'item' or name == 'binding')) then
 			self:ClearBindings()
-			local key = GetBindingKey(self.___binding ~= nil)
+			local key = GetBindingKey(self.___binding)
 			if(key) then
 				self:SetBindingClick(1, key, self, 'LeftButton')
 			end