From 1fd25a3d3a0d7053767066f48c5497d45ce988cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 31 May 2015 20:47:08 +0200 Subject: [PATCH] fix an explicit NRE from SwallowActor.WormAttack --- OpenRA.Mods.Common/Traits/AmmoPool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/AmmoPool.cs b/OpenRA.Mods.Common/Traits/AmmoPool.cs index 23ffcf5dd6..6cc285451b 100644 --- a/OpenRA.Mods.Common/Traits/AmmoPool.cs +++ b/OpenRA.Mods.Common/Traits/AmmoPool.cs @@ -99,7 +99,7 @@ namespace OpenRA.Mods.Common.Traits public void Attacking(Actor self, Target target, Armament a, Barrel barrel) { - if (a.Info.AmmoPoolName == Info.Name) + if (a != null && a.Info.AmmoPoolName == Info.Name) TakeAmmo(); }