We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6219c6 commit 664009cCopy full SHA for 664009c
EverythingToolbar/Helpers/ToolbarLogger.cs
@@ -47,10 +47,15 @@ private static void InitializeExceptionLoggers(ILogger logger)
47
{
48
logger.Error((Exception)args.ExceptionObject, "Unhandled exception");
49
};
50
- Application.Current.DispatcherUnhandledException += (sender, args) =>
+
51
+ if (Application.Current != null)
52
- logger.Error(args.Exception, "Unhandled exception on UI thread");
53
- };
+ // Not applicable for deskband
54
+ Application.Current.DispatcherUnhandledException += (sender, args) =>
55
+ {
56
+ logger.Error(args.Exception, "Unhandled exception on UI thread");
57
+ };
58
+ }
59
}
60
61
private static void ConfigureLogger()
0 commit comments