]> granicus.if.org Git - handbrake/commitdiff
WinGui: Initialise chapters to string.empty if the import file does not contain a...
authorScott <sr55@users.noreply.github.com>
Tue, 15 Sep 2015 19:14:30 +0000 (20:14 +0100)
committerScott <sr55@users.noreply.github.com>
Tue, 15 Sep 2015 19:14:30 +0000 (20:14 +0100)
win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs

index e270e3c154b20e0cf2fcd23e48b1acad4ad40f6b..d1353d029842e0eed1f16bfc285dfcbfd97df7ec 100644 (file)
@@ -186,8 +186,7 @@ namespace HandBrakeWPF.ViewModels
             foreach (ChapterMarker item in this.Task.ChapterNames)\r
             {\r
                 string chapterName;\r
-                chapterMap.TryGetValue(item.ChapterNumber, out chapterName);\r
-                item.ChapterName = chapterName;\r
+                item.ChapterName = chapterMap.TryGetValue(item.ChapterNumber, out chapterName) ? chapterName : string.Empty;\r
             }\r
         }\r
 \r