trying to fix an error

This commit is contained in:
svenvandevelde 2016-02-28 15:38:36 +01:00
parent 1c9644bee7
commit 8b556f1dce

View File

@ -45,7 +45,7 @@ end
function DESTROYBASETASK:EventDead( event )
self:T( { 'EventDead', event } )
if event.initiator then
if event.initiator and Object.getCategory(event.initiator) == Object.Category.UNIT then
local DestroyUnit = event.initiator
local DestroyUnitName = DestroyUnit:getName()
local DestroyGroup = Unit.getGroup( DestroyUnit )