From b025898d7bc481e201c201f7134cf7e93528b992 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 20 Dec 2024 21:35:49 -0500 Subject: [PATCH] Fix output name null edge case --- CHANGELIST.md | 1 + MPF.Frontend/ViewModels/MainViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 9abd9abe..e885a173 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -105,6 +105,7 @@ - Remove reference to removed file - Add README files for two libraries - Simplify output name assembly logic +- Fix output name null edge case ### 3.2.4 (2024-11-24) diff --git a/MPF.Frontend/ViewModels/MainViewModel.cs b/MPF.Frontend/ViewModels/MainViewModel.cs index edba3b58..ecf02047 100644 --- a/MPF.Frontend/ViewModels/MainViewModel.cs +++ b/MPF.Frontend/ViewModels/MainViewModel.cs @@ -1421,7 +1421,7 @@ namespace MPF.Frontend.ViewModels { // If the previous path is exactly the default path and last filename if (lastDirectory.EndsWith(Path.Combine(defaultOutputPath, lastFilename))) - lastDirectory = Path.GetDirectoryName(lastDirectory); + lastDirectory = Path.GetDirectoryName(lastDirectory) ?? string.Empty; // Create the output path if (lastDirectory == defaultOutputPath)