B2023-066: Crash when selecting a step that has an annotation where the annotation type has been removed.

This commit is contained in:
Kathy Ruffing 2023-06-05 15:28:43 +00:00
parent 65ec267c7a
commit 7311afded0

View File

@ -262,7 +262,8 @@ namespace Volian.Controls.Library
if (tn == null)
{
AnnotationTypeInfo ati = AnnotationTypeInfo.Get(aai.TypeID);
tn = annotationDeleted.Nodes.Add(ati.Name);
// B2023-066: Crash when trying to access a deleted annotation type (added the ati==null check)
tn = annotationDeleted.Nodes.Add(ati==null?"Deleted Annotation Type":ati.Name);
}
TreeNode cn = tn.Nodes.Add(aai.ListString());
cn.Tag = aai;