From 57294aeaf5a2e22efd49d69a261c2b83dab39d18 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 23 Mar 2023 08:45:54 +0100 Subject: [PATCH] Add'l check in UNIT:GetLife() --- Moose Development/Moose/Wrapper/Unit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index e5490a312..5eee9236a 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -920,7 +920,7 @@ function UNIT:GetLife() local DCSUnit = self:GetDCSObject() - if DCSUnit then + if DCSUnit and DCSUnit:isExist() then local UnitLife = DCSUnit:getLife() return UnitLife end