Fix AutoCarryall crashing when the cargo dies

This commit is contained in:
abcdefg30
2019-08-07 22:54:36 +02:00
committed by teinarss
parent ac3b3db7ac
commit ddf824b494

View File

@@ -118,6 +118,9 @@ namespace OpenRA.Mods.Common.Traits
public override bool Tick(Actor self)
{
if (cargo.IsDead)
return true;
var dropRange = self.Trait<Carryall>().Info.DropRange;
var destination = cargo.Trait<Carryable>().Destination;
if (destination != null)