fix a NullReferenceException

This commit is contained in:
Matthias Mailänder
2015-06-13 10:53:48 +02:00
parent 0816251bcd
commit d7e63ec28a

View File

@@ -1101,7 +1101,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
var chPal = nodeChPal != null && !string.IsNullOrEmpty(nodeChPal.Value.Value) ? nodeChPal.Value.Value : "effect";
ge.Value.Nodes.Remove(nodeChPal);
if (upgrades != 0)
if (upgrades != 0 && nodeUpgrades != null)
{
foreach (var nodeUpgrade in nodeUpgrades.Value.Nodes)
nodeUpgrade.Value.Value = "rank" + (string.IsNullOrEmpty(nodeUpgrade.Value.Value) ? null : ", ") + nodeUpgrade.Value.Value;