Improved logic for bug fix B2018-043. Added a NULL reference check in the logic that detects an infinite loop while checking for invalid transitions

This commit is contained in:
John Jenko 2018-03-08 14:33:20 +00:00
parent 7164ae98ef
commit 8b864b3d44

View File

@ -743,6 +743,8 @@ namespace VEPROMS.CSLA.Library
{ {
bool hasAnnotation = false; bool hasAnnotation = false;
AnnotationType myType = AnnotationType.GetByNameOrCreate("Link Converted To Text"); AnnotationType myType = AnnotationType.GetByNameOrCreate("Link Converted To Text");
if (itemInfo.ItemAnnotations != null)
{
foreach (AnnotationInfo anot in itemInfo.ItemAnnotations) foreach (AnnotationInfo anot in itemInfo.ItemAnnotations)
{ {
if (anot.TypeID == myType.TypeID && anot.SearchText == "Invalid Transition Format") if (anot.TypeID == myType.TypeID && anot.SearchText == "Invalid Transition Format")
@ -755,6 +757,7 @@ namespace VEPROMS.CSLA.Library
Annotation.MakeAnnotation(myItem, myType, "", "Invalid Transition Format", null); Annotation.MakeAnnotation(myItem, myType, "", "Invalid Transition Format", null);
} }
} }
}
break; break;
} }
} }