Fix: Lua error
Alar of Runetotem [01-31-17 - 16:16]
Fix: Lua error
Message: ..\AddOns\GarrisonCommander\ShipYard.lua line 399:
attempt to index upvalue 'GCS' (a nil value)
diff --git a/ShipYard.lua b/ShipYard.lua
index a35177f..25392c4 100644
--- a/ShipYard.lua
+++ b/ShipYard.lua
@@ -85,7 +85,9 @@ function module:OnInitialize()
end
function module:OpenLastTab()
+--@debug@
print("Open Last Tab",lastTab)
+--@end-debug@
lastTab=lastTab or PanelTemplates_GetSelectedTab(GSF)
if lastTab then
if GSF.MissionControlTab:IsVisible() then
@@ -396,7 +398,7 @@ function module:AddMenu()
--@debug@
print("Adding Menu",GCS.Menu,GSF.MissionTab:IsVisible(),GSF.FollowerTab:IsVisible())
--@end-debug@
- if GCS.Menu then
+ if not GCS or GCS.Menu then
return
end
local menu,size