Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs =================================================================== diff -u -r72fae487f4d6debd3cec5157de8796827bf27a0c -rc50d495de60db188ded1147be4d6d64d7ea29a2a --- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision 72fae487f4d6debd3cec5157de8796827bf27a0c) +++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision c50d495de60db188ded1147be4d6d64d7ea29a2a) @@ -323,7 +323,7 @@ { log.Error(CoreCommonGuiResources.App_Unhandled_exception, exception); - if (gui != null && gui.MainWindow != null) + if (gui?.MainWindow != null) { using (var exceptionDialog = new ExceptionDialog(gui.MainWindow, gui, exception) { @@ -422,12 +422,9 @@ .SelectMany(r => r.GetAppenders()) .OfType() .FirstOrDefault(); - if (fileAppender == null || string.IsNullOrWhiteSpace(fileAppender.File)) - { - return string.Empty; - } - - return Path.GetDirectoryName(fileAppender.File); + return string.IsNullOrWhiteSpace(fileAppender?.File) + ? string.Empty + : Path.GetDirectoryName(fileAppender.File); } } } \ No newline at end of file