Skip to content

Commit ed3221c

Browse files
authored
Fix LT-20337: Crash Navigating From Bulk Edit Phoneme Features (#426)
1 parent 0dabd60 commit ed3221c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Src/LexText/LexTextControls/PhonologicalFeaturePopupTreeManager.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,12 @@ protected override void Dispose(bool disposing)
221221
{
222222
Cache.DomainDataByFlid.BeginUndoTask(LexTextControls.ksUndoInsertPhonologicalFeature,
223223
LexTextControls.ksRedoInsertPhonologicalFeature);
224-
foreach (var cmBaseAnnotation in m_annotations)
224+
foreach (var cmBaseAnnotation in m_annotations.ToList())
225225
{
226-
cmBaseAnnotation.Delete();
226+
if (cmBaseAnnotation.IsValidObject)
227+
cmBaseAnnotation.Delete();
228+
else
229+
m_annotations.Remove(cmBaseAnnotation);
227230
}
228231
Cache.DomainDataByFlid.EndUndoTask();
229232
}

0 commit comments

Comments
 (0)