fix rare lua error when using with FCO

Leandro Silva [02-07-20 - 20:05]
fix rare lua error when using with FCO
Filename
LeoTrainer.txt
LeoTrainerConst.lua
LeoTrainerUI.lua
diff --git a/LeoTrainer.txt b/LeoTrainer.txt
index 44348eb..6bf884a 100644
--- a/LeoTrainer.txt
+++ b/LeoTrainer.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Trainer
 ## APIVersion: 100029 100030
-## Version: 1.3.2
-## AddOnVersion: 132
+## Version: 1.3.3
+## AddOnVersion: 133
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoTrainerSavedVariables
 ## DependsOn: LeoAltholic LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoTrainerConst.lua b/LeoTrainerConst.lua
index 0f0ff03..5f402f6 100644
--- a/LeoTrainerConst.lua
+++ b/LeoTrainerConst.lua
@@ -3,7 +3,7 @@ LeoTrainer = {}
 LeoTrainerUI = {}
 LeoTrainer.name = "LeoTrainer"
 LeoTrainer.displayName = "Leo's Trainer"
-LeoTrainer.version = "1.3.2"
+LeoTrainer.version = "1.3.3"
 LeoTrainer.chatPrefix = "|c39B027" .. LeoTrainer.name .. "|r: "
 LeoTrainer.setting = nil
 LeoTrainer.hidden = true
diff --git a/LeoTrainerUI.lua b/LeoTrainerUI.lua
old mode 100644
new mode 100755
index 6c1815f..e2aa477
--- a/LeoTrainerUI.lua
+++ b/LeoTrainerUI.lua
@@ -449,7 +449,7 @@ function LeoTrainer.UpdateUI(charName)
                 local hasItem = false
                 for _, itemData in pairs(items) do
                     if itemData.craft == craft and itemData.line == line and itemData.trait == trait then
-                        if not LeoTrainer.savedVariables.onlyResearchFCO or (FCOIS and FCOIS.IsIconEnabled(FCOIS_CON_ICON_RESEARCH) and FCOIS.IsMarked(itemData.bagId, itemData.slot, FCOIS_CON_ICON_RESEARCH)) then
+                        if not LeoTrainer.savedVariables.onlyResearchFCO or (FCOIS and FCOIS.settingsVars.settings.isIconEnabled and FCOIS.IsIconEnabled(FCOIS_CON_ICON_RESEARCH) and FCOIS.IsMarked(itemData.bagId, itemData.slot, FCOIS_CON_ICON_RESEARCH)) then
                             hasItem = true
                             break
                         end