Merge pull request #8327 from Mailaender/swallow-ammopool-nre

Fixed an explicit NRE from SwallowActor.WormAttack
This commit is contained in:
Oliver Brakmann
2015-06-01 17:14:37 +02:00

View File

@@ -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();
}