B2018-047: crash after paste replace on newly created section within newly created procedure

This commit is contained in:
Kathy Ruffing 2018-05-31 13:48:31 +00:00
parent 8c84a8b96d
commit 7ab18b30d1

View File

@ -2178,7 +2178,8 @@ namespace Volian.Controls.Library
ItemInfo newEnhStep = replItemInfo.PasteEnhancedItems(copyStartID, ii, ItemInfo.EAddpingPart.Replace, chgId);
}
}
SelectedNode = (VETreeNode)((prevtn != null) ? prevtn.NextNode : partn.FirstNode);
// B2018-047: was crashing on the following line (before change it was casting the result to a VETreeNote when the partn.FirstNode was just a TreeNode)
SelectedNode = prevtn != null ? prevtn.NextNode : partn.FirstNode;
}
private void tv_NodeCopy()
{