Fix NREs in UpgradeRules.

This commit is contained in:
Matthias Mailänder
2016-04-17 14:15:49 +02:00
parent c2c26cbcdc
commit 62bc2a27d9

View File

@@ -100,7 +100,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
{
if (node.Key == "Color")
{
if (parent.Key.StartsWith("FixedColorPalette"))
if (parent != null && parent.Key.StartsWith("FixedColorPalette"))
TryUpdateHSLColor(ref node.Value.Value);
else
TryUpdateColor(ref node.Value.Value);
@@ -753,7 +753,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (engineVersion < 20160402)
{
// Fix misleading property naming.
if (node.Key == "EffectSequence" && parent.Key == "SpawnActorPower")
if (node.Key == "EffectSequence" && parent != null && parent.Key == "SpawnActorPower")
node.Key = "EffectImage";
}