Autolase - fixed error when not using a pilotset

This commit is contained in:
Applevangelist 2021-11-01 19:46:56 +01:00
parent 6fe2422bc9
commit e7e2184760

View File

@ -109,7 +109,7 @@ AUTOLASE = {
--- AUTOLASE class version.
-- @field #string version
AUTOLASE.version = "0.0.9"
AUTOLASE.version = "0.0.10"
-------------------------------------------------------------------
-- Begin Functional.Autolase.lua
@ -297,6 +297,7 @@ end
-- @param #AUTOLASE self
-- @return #AUTOLASE self
function AUTOLASE:SetPilotMenu()
if self.usepilotset then
local pilottable = self.pilotset:GetSetObjects() or {}
for _,_unit in pairs (pilottable) do
local Unit = _unit -- Wrapper.Unit#UNIT
@ -306,6 +307,7 @@ function AUTOLASE:SetPilotMenu()
lasemenu:Refresh()
end
end
end
return self
end