diff --git a/src/LipUI/Global.cs b/src/LipUI/Global.cs index 18b4572..3786cef 100644 --- a/src/LipUI/Global.cs +++ b/src/LipUI/Global.cs @@ -412,10 +412,9 @@ void Save() void CollectionChangeHandler(object sender, NotifyCollectionChangedEventArgs e) { Save(); - foreach (var item in e.NewItems) - { - Subscribe(item); - } + if (e.NewItems is not null) + foreach (var item in e.NewItems) + Subscribe(item); } void Subscribe(object? sub) {