From e66358792e09a7001aa8995ec1fa3a6c33cbbcba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 2 Jun 2014 10:18:09 +0200 Subject: [PATCH] fix a rare NullReferenceException in CanUnload closes #5528 --- OpenRA.Mods.RA/Cargo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Cargo.cs b/OpenRA.Mods.RA/Cargo.cs index a2d581dc5e..37db6af460 100644 --- a/OpenRA.Mods.RA/Cargo.cs +++ b/OpenRA.Mods.RA/Cargo.cs @@ -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().CanEnterCell(c))); + && CurrentAdjacentCells != null && CurrentAdjacentCells.Any(c => Passengers.Any(p => p.Trait().CanEnterCell(c))); } public bool CanLoad(Actor self, Actor a)