Updated for 100019

Jarth [05-23-17 - 19:00]
Updated for 100019
Filename
Changelog
SummonAssistant.lua
SummonAssistant.toc
SummonAssistant.txt
diff --git a/Changelog b/Changelog
index dde78d4..71f9e4c 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,9 @@
 -------------------------------------------------------------------------------
 Summon Assistant
 -------------------------------------------------------------------------------
+Version 1.2.0 (23-05-2017)
+- Fixed bug with textures, after update to v100019.
+
 Version 1.1.0 (01-03-2017)
 - Fixed issues with default settings.
 -- Cases where account setting could not be disabled
diff --git a/SummonAssistant.lua b/SummonAssistant.lua
index 705cca6..25ba809 100644
--- a/SummonAssistant.lua
+++ b/SummonAssistant.lua
@@ -1,7 +1,7 @@
 --[[
 Author: Jarth
 Filename: SummonAssistant.lua
-Version: V1.1.0
+Version: V1.2.0
 ]]--

 -------------------------------------------------------------------------------------------------
@@ -13,7 +13,7 @@ local LAM2 = LibStub:GetLibrary("LibAddonMenu-2.0")
 --  VARIABLE --
 -------------------------------------------------------------------------------------------------
 local ADDON_NAME = "SummonAssistant"
-local ADDON_VERSION = 1.1
+local ADDON_VERSION = 1.2.0
 local ADDON_AUTHOR = "Jarth"
 local ADDON_WEBSITE = ""
 local SummonAssistant = {} -- this may seem odd, but it sets the access level for "SummonAssistant"
@@ -57,7 +57,7 @@ function SummonAssistant.initializeButtons()
         enabled = IsCollectibleUnlocked(id)
       end
       if SummonAssistant.SA_Button[i] == nil then
-        SummonAssistant.SA_Button[i] = WINDOW_MANAGER:CreateControlFromVirtual("SA_Button"..i, SA_FrameBackdrop, "SA_Button", 1)
+        SummonAssistant.SA_Button[i] = WINDOW_MANAGER:CreateControlFromVirtual("SA_Button", SA_FrameBackdrop, "SA_Button", i)
         SummonAssistant.SA_Button[i]:SetId(i)
       end
       SummonAssistant.setupButton(i, SummonAssistant.SA_Button[i], id, enabled)
@@ -94,19 +94,22 @@ end

 function SummonAssistant.setupButton(i, SA_Button, id, enabled)
   local SA_ButtonTexture = SummonAssistant.wm:GetControlByName("SA_Button"..i.."Texture")
-  if enabled then
-    if id == 300 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_fence_01.dds")
-    elseif id == 267 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_banker_01.dds")
-    elseif id == 301 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_vendor_01.dds")
-    end
-    SA_Button:SetHandler("OnClicked", function(self) SummonAssistant.saClicked(SA_Button:GetId()) end)
+  if SA_ButtonTexture == nil then
   else
-    if id == 300 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_fence_01_empty.dds")
-    elseif id == 267 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_banker_01-empty.dds")
-    elseif id == 301 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_vendor_01_empty.dds")
+    if enabled then
+      if id == 300 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_fence_01.dds")
+      elseif id == 267 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_banker_01.dds")
+      elseif id == 301 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_vendor_01.dds")
+      end
+      SA_Button:SetHandler("OnClicked", function(self) SummonAssistant.saClicked(SA_Button:GetId()) end)
     else
-    SA_Button:SetAlpha(0)
-    end
+      if id == 300 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_fence_01_empty.dds")
+      elseif id == 267 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_banker_01-empty.dds")
+      elseif id == 301 then SA_ButtonTexture:SetTexture("/esoui/art/icons/assistant_vendor_01_empty.dds")
+      else
+      SA_Button:SetAlpha(0)
+      end
+    end
   end
 end

diff --git a/SummonAssistant.toc b/SummonAssistant.toc
index ecddb29..61076ed 100644
--- a/SummonAssistant.toc
+++ b/SummonAssistant.toc
@@ -9,7 +9,7 @@
 ## Description: Summon collection banker!
 ## Version: @project-version@
 ## Author: Jarth
-## APIVersion: 100017 100018
+## APIVersion: 100017 100018 100019
 ## SavedVariables: SummonAssistant_Account
 ## SavedVariables: SummonAssistant_Character

diff --git a/SummonAssistant.txt b/SummonAssistant.txt
index d9fc3cc..2ca7ef4 100644
--- a/SummonAssistant.txt
+++ b/SummonAssistant.txt
@@ -7,7 +7,7 @@
 ## Title: SummonAssistant
 ## Description: Summon collection banker!
 ## Author: Jarth
-## APIVersion: 100017 100018
+## APIVersion: 100017 100018 100019
 ## SavedVariables: SummonAssistant_Account
 ## SavedVariables: SummonAssistant_Character