Fix crash on surrender

This commit is contained in:
Paul Chote
2011-02-15 22:17:25 +13:00
parent 3e28fce7ba
commit df4a860dfe

View File

@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Cnc
public void Damaged(Actor self, AttackInfo e)
{
if (e.DamageState == DamageState.Dead && e.Warhead.InfDeath == Info.InfDeath
if (e.DamageState == DamageState.Dead && e.Warhead != null && e.Warhead.InfDeath == Info.InfDeath
&& self.World.SharedRandom.Next(100) <= Info.Probability)
self.World.AddFrameEndTask(w =>
{