diff --git a/src/Commands.WinForms/GuiCommandHandler.Notifications.cs b/src/Commands.WinForms/GuiCommandHandler.Notifications.cs index 412a3feef..709305dc5 100644 --- a/src/Commands.WinForms/GuiCommandHandler.Notifications.cs +++ b/src/Commands.WinForms/GuiCommandHandler.Notifications.cs @@ -48,8 +48,17 @@ protected override void DisplayLogEntry(LogSeverity severity, string message) private void ShowNotification(string title, string message, ToolTipIcon icon = ToolTipIcon.None) { void Classic() - => new NotifyIcon {Visible = true, Text = Branding.Name ?? "Zero Install", Icon = Branding.Icon} - .ShowBalloonTip(10000, title, message, icon); + { + try + { + new NotifyIcon {Visible = true, Text = Branding.Name ?? "Zero Install", Icon = Branding.Icon} + .ShowBalloonTip(10000, title, message, icon); + } + catch (Win32Exception) + { + // Notifications are only shown with best effort + } + } void Modern(string appId) {