potentially fixed bug in MultiFormatTextBox which lead to application crash

master
Jonas Arnold 3 years ago
parent 12a3b6792f
commit c7ac429976
  1. 2
      MultiTerm.Wpf.CustomControl/MultiFormatTextBox/MultiFormatTextBox.cs

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

Loading…
Cancel
Save