From 753d8a44657ab9a3200efd770940aa58b5880247 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Mon, 13 Jan 2025 17:35:35 +0100 Subject: [PATCH] fixed stupid init bug --- src/BreCalClient/AppNotification.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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)); + } } }