Let's not crash if WeaponInfo.Report[] is empty

This commit is contained in:
Scott_NZ
2013-02-26 18:08:55 +13:00
parent 1438030e82
commit 81c8f0360f
3 changed files with 5 additions and 4 deletions

View File

@@ -148,7 +148,7 @@ namespace OpenRA.Mods.RA
if (projectile != null)
self.World.Add(projectile);
if (args.weapon.Report != null)
if (args.weapon.Report != null && args.weapon.Report.Any())
Sound.Play(args.weapon.Report.Random(self.World.SharedRandom) + ".aud", self.CenterLocation);
}
});