Quantcast

fix part deux

Steven Jackson [08-24-14 - 03:36]
fix part deux
Filename
Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua
diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua
index 24a1a86..2320753 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua
@@ -328,18 +328,7 @@ local function GuildFrameStyle()
 	GuildNextPerkButtonIconTexture:Point("TOPLEFT", 2, -2)
 	GuildNextPerkButton:SetPanelTemplate("Inset")
 	GuildNextPerkButton.Panel:WrapOuter(GuildNextPerkButtonIconTexture)
-	for b = 1, 8 do
-		local e = _G["GuildPerksContainerButton"..b]
-		e:Formula409()
-		if e.icon then
-			e.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-			e.icon:ClearAllPoints()
-			e.icon:Point("TOPLEFT", e, "TOPLEFT", 2, -2)
-			e:SetFixedPanelTemplate("Button")
-			e.Panel:WrapOuter(e.icon)
-			e.icon:SetParent(e.Panel)
-		end
-	end;
+
 	GuildRosterContainer:SetFixedPanelTemplate("Pattern")
 	STYLE:ApplyScrollStyle(GuildRosterContainerScrollBar, 5)
 	GuildRosterShowOfflineButton:SetCheckboxTemplate(true)
@@ -414,16 +403,32 @@ local function GuildFrameStyle()
 	GuildRewardsFrame:SetFixedPanelTemplate("Pattern")
 	STYLE:ApplyScrollStyle(GuildRewardsContainerScrollBar, 5)
 	for b = 1, 8 do
+		local button = _G["GuildPerksContainerButton"..b]
+		if button then
+			button:Formula409()
+			if button.icon then
+				button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+				button.icon:ClearAllPoints()
+				button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2)
+				button:SetFixedPanelTemplate("Button")
+				button.Panel:WrapOuter(button.icon)
+				button.icon:SetParent(button.Panel)
+			end
+		end
+	end;
+	for b = 1, 8 do
 		local button = _G["GuildRewardsContainerButton"..b]
-		button:Formula409()
-		if button.icon then
-			button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
-			button.icon:ClearAllPoints()
-			button.icon:Point("TOPLEFT", 2, -2)
-			button:SetFixedPanelTemplate("Button")
-			button.Panel:WrapOuter(button.icon)
-			button.icon:SetParent(button.Panel)
-		end
+		if button then
+			button:Formula409()
+			if button.icon then
+				button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
+				button.icon:ClearAllPoints()
+				button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2)
+				button:SetFixedPanelTemplate("Button")
+				button.Panel:WrapOuter(button.icon)
+				button.icon:SetParent(button.Panel)
+			end
+		end
 	end;
 	local maxCalendarEvents = CalendarGetNumGuildEvents();
 	local scrollFrame = GuildInfoFrameApplicantsContainer;