@ -83,7 +83,7 @@ public class MultiFormatTextBox : Control
~MultiFormatTextBox()
{
// unregister events
if (this.CurrentMultiFormatString is INotifyCollectionChanged incc)
if (this.CurrentMultiFormatString != null && this.CurrentMultiFormatString is INotifyCollectionChanged incc)
incc.CollectionChanged -= this.MultiFormatString_CollectionChanged;
}