diff --git a/src/BreCalClient/AppNotification.cs b/src/BreCalClient/AppNotification.cs index 2215f26..3164052 100644 --- a/src/BreCalClient/AppNotification.cs +++ b/src/BreCalClient/AppNotification.cs @@ -78,11 +78,14 @@ namespace BreCalClient { _notifications.Clear(); - // load notification ids that have been processed - foreach (string? notification_id in Properties.Settings.Default.Notifications) + if (Properties.Settings.Default.Notifications != null) { - if(Int32.TryParse(notification_id, out int result)) - _notifications.Add(result, new AppNotification(result)); + // load notification ids that have been processed + foreach (string? notification_id in Properties.Settings.Default.Notifications) + { + if (Int32.TryParse(notification_id, out int result)) + _notifications.Add(result, new AppNotification(result)); + } } }