From 905b442e9b4df71db1d5266ca8eb8ee250dbb4c1 Mon Sep 17 00:00:00 2001 From: Shafik Date: Mon, 3 Feb 2025 09:03:43 +0200 Subject: [PATCH] [FIXED] attempt to index field (a nil value) --- Moose Development/Moose/Functional/CleanUp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Functional/CleanUp.lua b/Moose Development/Moose/Functional/CleanUp.lua index 5d975c3ca..4b909dcd5 100644 --- a/Moose Development/Moose/Functional/CleanUp.lua +++ b/Moose Development/Moose/Functional/CleanUp.lua @@ -354,7 +354,7 @@ function CLEANUP_AIRBASE.__:EventAddForCleanUp( Event ) self:F({Event}) - if Event.IniDCSUnit and Event.IniCategory == Object.Category.UNIT then + if Event.IniDCSUnit and Event.IniUnit and Event.IniCategory == Object.Category.UNIT then if self.CleanUpList[Event.IniDCSUnitName] == nil then if self:IsInAirbase( Event.IniUnit:GetVec2() ) then self:AddForCleanUp( Event.IniUnit, Event.IniDCSUnitName ) @@ -362,7 +362,7 @@ function CLEANUP_AIRBASE.__:EventAddForCleanUp( Event ) end end - if Event.TgtDCSUnit and Event.TgtCategory == Object.Category.UNIT then + if Event.TgtDCSUnit and Event.TgtUnit and Event.TgtCategory == Object.Category.UNIT then if self.CleanUpList[Event.TgtDCSUnitName] == nil then if self:IsInAirbase( Event.TgtUnit:GetVec2() ) then self:AddForCleanUp( Event.TgtUnit, Event.TgtDCSUnitName )