From 8ea1a78f7ac7e4f9bec9cb551b029754c613f642 Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 15 Sep 2015 20:14:30 +0100 Subject: WinGui: Initialise chapters to string.empty if the import file does not contain a name for a given chapter number. --- win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs index e270e3c15..d1353d029 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs @@ -186,8 +186,7 @@ namespace HandBrakeWPF.ViewModels foreach (ChapterMarker item in this.Task.ChapterNames) { string chapterName; - chapterMap.TryGetValue(item.ChapterNumber, out chapterName); - item.ChapterName = chapterName; + item.ChapterName = chapterMap.TryGetValue(item.ChapterNumber, out chapterName) ? chapterName : string.Empty; } } -- cgit v1.2.3