B2024-061- Added a null reference check in the save annotation code. Need for when Admin deletes the annotation while a user modified the text of it #394

Merged
jjenko merged 1 commits from B2024-061 into Development 2024-08-21 11:45:11 -04:00
Showing only changes of commit a629f6834b - Show all commits

View File

@ -674,12 +674,15 @@ namespace Volian.Controls.Library
{
using (Annotation annotation = CurrentAnnotation.Get())
{
annotation.RtfText = rtxbComment.Rtf;
annotation.SearchText = rtxbComment.Text;
annotation.MyAnnotationType = annotationType;
annotation.DTS = DateTime.Now;
annotation.UserID = Volian.Base.Library.VlnSettings.UserID;
annotation.Save();
if (annotation != null) // B2024-061 check for null reference
{
annotation.RtfText = rtxbComment.Rtf;
annotation.SearchText = rtxbComment.Text;
annotation.MyAnnotationType = annotationType;
annotation.DTS = DateTime.Now;
annotation.UserID = Volian.Base.Library.VlnSettings.UserID;
annotation.Save();
}
}
}
}