Warehouse 0.1.9

Many bugs spotted
This commit is contained in:
funkyfranky
2018-08-16 23:10:23 +02:00
parent 22da329fca
commit 5a2e1f01b4
4 changed files with 112 additions and 100 deletions

View File

@@ -119,10 +119,12 @@ end
-- @param DCS#Unit DCSUnit An existing DCS Unit object reference.
-- @return #UNIT self
function UNIT:Find( DCSUnit )
local UnitName = DCSUnit:getName()
local UnitFound = _DATABASE:FindUnit( UnitName )
return UnitFound
if DCSUnit then
local UnitName = DCSUnit:getName()
local UnitFound = _DATABASE:FindUnit( UnitName )
return UnitFound
end
return nil
end
--- Find a UNIT in the _DATABASE using the name of an existing DCS Unit.