[FIXED] attempt to index field 'IniDCSGroup' (a nil value)

This commit is contained in:
Shafik 2025-01-10 21:40:03 +02:00
parent 4c1c36ef46
commit 1182a5eb1e

View File

@ -7962,7 +7962,7 @@ do -- SET_OPSGROUP
function SET_OPSGROUP:_EventOnDeadOrCrash( Event )
--self:F( { Event } )
if Event.IniDCSUnit then
if Event.IniDCSGroup then
local ObjectName, Object = self:FindInDatabase( Event )
if ObjectName then
if Event.IniDCSGroup:getSize() == 1 then -- Only remove if the last unit of the group was destroyed.