Merge pull request #1901 from MrAlien753/patch-1

fix nil error message in dcs.log
This commit is contained in:
Frank
2023-02-03 22:34:01 +01:00
committed by GitHub

View File

@@ -715,7 +715,7 @@ do -- ZONE_CAPTURE_COALITION
local UnitHit = EventData.TgtUnit
if UnitHit.ClassName ~= "SCENERY" then
if UnitHit and UnitHit.ClassName ~= "SCENERY" then
-- Check if unit is inside the capture zone and that it is of the defending coalition.
if UnitHit and UnitHit:IsInZone(self) and UnitHit:GetCoalition()==self.Coalition then