Fix a crash in the ReplaceAttackTypeStrafe update rule

This commit is contained in:
abcdefg30
2020-02-05 16:54:06 +01:00
committed by Paul Chote
parent c18857f15d
commit de0bb9ee39

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.UpdateRules.Rules
yield break;
var attackType = attackAircraft.LastChildMatching("AttackType");
if (attackType.NodeValue<AirAttackType>() == AirAttackType.Strafe)
if (attackType != null && attackType.NodeValue<AirAttackType>() == AirAttackType.Strafe)
attackAircraft.RemoveNode(attackType);
attackAircraft.RemoveNodes("AttackTurnDelay");