diff --git a/OpenRA.Mods.Common/Activities/DeliverUnit.cs b/OpenRA.Mods.Common/Activities/DeliverUnit.cs index 4f1e67ca5e..cd7678ddd6 100644 --- a/OpenRA.Mods.Common/Activities/DeliverUnit.cs +++ b/OpenRA.Mods.Common/Activities/DeliverUnit.cs @@ -41,6 +41,12 @@ namespace OpenRA.Mods.Common.Activities protected override void OnFirstRun(Actor self) { + // In case this activity was queued (either via queued order of via AutoCarryall) + // something might have happened to the cargo in the time between the activity being + // queued and being run, so short out if it is no longer valid. + if (carryall.Carryable == null) + return; + if (assignTargetOnFirstRun) destination = Target.FromCell(self.World, self.Location);