fix an explicit NRE from SwallowActor.WormAttack

This commit is contained in:
Matthias Mailänder
2015-05-31 20:47:08 +02:00
parent f25300c703
commit 1fd25a3d3a

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