Merge pull request #5529 from Mailaender/rare-pillbox-nre

Fixed a rare NullReferenceException in CanUnload
This commit is contained in:
Paul Chote
2014-06-02 21:31:53 +12:00

View File

@@ -108,7 +108,7 @@ namespace OpenRA.Mods.RA
bool CanUnload()
{
return !IsEmpty(self) && self.CenterPosition.Z == 0
&& CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait<IPositionable>().CanEnterCell(c)));
&& CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait<IPositionable>().CanEnterCell(c)));
}
public bool CanLoad(Actor self, Actor a)