diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 35ce5f77..7fb40f96 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -743,16 +743,19 @@ namespace VEPROMS.CSLA.Library { bool hasAnnotation = false; AnnotationType myType = AnnotationType.GetByNameOrCreate("Link Converted To Text"); - foreach (AnnotationInfo anot in itemInfo.ItemAnnotations) + if (itemInfo.ItemAnnotations != null) { - if (anot.TypeID == myType.TypeID && anot.SearchText == "Invalid Transition Format") - hasAnnotation = true; - } - if (!hasAnnotation) - { - using (Item myItem = itemInfo.Get()) + foreach (AnnotationInfo anot in itemInfo.ItemAnnotations) { - Annotation.MakeAnnotation(myItem, myType, "", "Invalid Transition Format", null); + if (anot.TypeID == myType.TypeID && anot.SearchText == "Invalid Transition Format") + hasAnnotation = true; + } + if (!hasAnnotation) + { + using (Item myItem = itemInfo.Get()) + { + Annotation.MakeAnnotation(myItem, myType, "", "Invalid Transition Format", null); + } } } break;