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:
parent
7164ae98ef
commit
8b864b3d44
@ -743,16 +743,19 @@ 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");
|
||||||
foreach (AnnotationInfo anot in itemInfo.ItemAnnotations)
|
if (itemInfo.ItemAnnotations != null)
|
||||||
{
|
{
|
||||||
if (anot.TypeID == myType.TypeID && anot.SearchText == "Invalid Transition Format")
|
foreach (AnnotationInfo anot in itemInfo.ItemAnnotations)
|
||||||
hasAnnotation = true;
|
|
||||||
}
|
|
||||||
if (!hasAnnotation)
|
|
||||||
{
|
|
||||||
using (Item myItem = itemInfo.Get())
|
|
||||||
{
|
{
|
||||||
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;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user