This commit is contained in:
Applevangelist
2024-08-14 11:34:57 +02:00
parent d354f02507
commit c82359f87b
2 changed files with 3 additions and 1 deletions

View File

@@ -4109,7 +4109,7 @@ function RANGE:_GetPlayerUnitAndName( _unitName )
-- Get DCS unit from its name.
local DCSunit = Unit.getByName( _unitName )
if DCSunit then
if DCSunit and DCSunit.getPlayerName then
local playername = DCSunit:getPlayerName()
local unit = UNIT:Find( DCSunit )