diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs index de0057cf..bd0baaf3 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs @@ -544,8 +544,9 @@ namespace VEPROMS.CSLA.Library public static void CheckSourceDestinationType(int copyStartID, ItemInfo itemInfo) { ItemInfo cpyItem = ItemInfo.Get(copyStartID); - int? SourceType = cpyItem._MyContent.Type; - int? DestType = itemInfo._MyContent.Type; + // B2017-065 use MyContent instead of _Mycontent so that if null it will get the needed content + int? SourceType = cpyItem.MyContent.Type; + int? DestType = itemInfo.MyContent.Type; if (DestType >= 20000 && DestType != SourceType) { string msg = "The step you are copying TO is a different type than the step you are copying FROM.\n\nThe copied step will inherit the destination step type.\n\nOnce copied, the step type can be changed from the Tags tab on the Step Properties panel."; @@ -1278,7 +1279,7 @@ namespace VEPROMS.CSLA.Library // don't connect back, so find one that does based on Enhance HLS note list & // the notes' links back to source. ItemInfo enhNtItem = null; - while (enhNtItem == null && enhIndxNt < enhHls.Notes.Count) + while (enhNtItem == null && enhHls.Notes != null && enhIndxNt < enhHls.Notes.Count) // B2017-065 added a null check for Notes { ItemInfo enhTstNote = enhHls.Notes[enhIndxNt]; StepConfig enhTstNoteCfg = enhTstNote.MyConfig as StepConfig;