Handle notification icon error until dependency issue gets worked out

This commit is contained in:
2025-11-24 09:54:16 -05:00
parent c186de0394
commit 7ace91684c
2 changed files with 12 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ internal static class NotificationIcon
_notificationIcon = new TaskbarIcon { Icon = Resources.Application };
_notificationIcon.TrayMouseDoubleClick += HandleNotificationIconDoubleClick;
// Setup the menu
// Set up the menu
var contextMenu = new ContextMenu();
contextMenu.Opened += HandleContextMenuOpened;
@@ -76,7 +76,7 @@ internal static class NotificationIcon
public static void Dispose()
{
// Get rid of the icon
_notificationIcon.Dispose();
_notificationIcon?.Dispose();
_notificationIcon = null;
_mainWindow = null;