diff --git a/src/Files.App/Helpers/Application/AppLifecycleHelper.cs b/src/Files.App/Helpers/Application/AppLifecycleHelper.cs index be9cf526f857..66219fba58b4 100644 --- a/src/Files.App/Helpers/Application/AppLifecycleHelper.cs +++ b/src/Files.App/Helpers/Application/AppLifecycleHelper.cs @@ -310,7 +310,7 @@ public static void HandleAppUnhandledException(Exception? ex, bool showToastNoti // Save the current tab list in case it was overwriten by another instance SaveSessionTabs(); - App.Logger.LogError(ex, ex?.Message ?? "An unhandled error occurred."); + App.Logger?.LogError(ex, ex?.Message ?? "An unhandled error occurred."); if (!showToastNotification) return;