fix stationexit without lazywritcreator
Leandro Silva [04-01-20 - 20:31]
fix stationexit without lazywritcreator
diff --git a/LeoTrainer.lua b/LeoTrainer.lua
index 5d162c1..9217a67 100644
--- a/LeoTrainer.lua
+++ b/LeoTrainer.lua
@@ -113,7 +113,9 @@ end
function LeoTrainer.stationExit(_, craftSkill)
EVENT_MANAGER:UnregisterForEvent(LeoTrainer.name, EVENT_CRAFT_COMPLETED)
- EVENT_MANAGER:UnregisterForEvent(WritCreater.name, EVENT_CRAFT_COMPLETED)
+ if WritCreater then
+ EVENT_MANAGER:UnregisterForEvent(WritCreater.name, EVENT_CRAFT_COMPLETED)
+ end
LeoTrainer.ui.OnStationExit(craftSkill)
LeoTrainer.research.OnStationExit(craftSkill)
diff --git a/LeoTrainer.txt b/LeoTrainer.txt
index 43b5a42..e44724e 100644
--- a/LeoTrainer.txt
+++ b/LeoTrainer.txt
@@ -1,7 +1,7 @@
## Title: Leo's Trainer
## APIVersion: 100030
-## Version: 2.0.1
-## AddOnVersion: 201
+## Version: 2.0.2
+## AddOnVersion: 202
## Author: |c39B027@LeandroSilva|r
## SavedVariables: LeoTrainer_Settings LeoTrainer_Data
## OptionalDependsOn: FCOItemSaver PersonalAssistant DolgubonsLazyWritCreator
diff --git a/LeoTrainerConst.lua b/LeoTrainerConst.lua
index d23f3f7..0fd8650 100644
--- a/LeoTrainerConst.lua
+++ b/LeoTrainerConst.lua
@@ -8,7 +8,7 @@ LeoTrainer = {
}
LeoTrainer.name = "LeoTrainer"
LeoTrainer.displayName = "Leo's Trainer"
-LeoTrainer.version = "2.0.1"
+LeoTrainer.version = "2.0.2"
LeoTrainer.chatPrefix = "|c39B027" .. LeoTrainer.name .. "|r: "
LeoTrainer.setting = nil
LeoTrainer.hidden = true