]> granicus.if.org Git - handbrake/commitdiff
WinGui: Don't crash if a corrupted source file causes the duration to be mis-detecte...
authorsr55 <sr55.hb@outlook.com>
Sat, 1 Jun 2013 15:06:46 +0000 (15:06 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 1 Jun 2013 15:06:46 +0000 (15:06 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5539 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index 5fad2dca682bb52b4cabc86e6a3db2aefad7b3cc..fd896f197998972fc4ffa84294f310eb0a367514 100644 (file)
@@ -812,7 +812,7 @@ namespace HandBrakeWPF.ViewModels
 \r
 \r
                     this.SelectedStartPoint = 1;\r
-                    this.SelectedEndPoint = selectedTitle.Chapters.Last().ChapterNumber;\r
+                    this.SelectedEndPoint = selectedTitle.Chapters != null && selectedTitle.Chapters.Count > 0 ? selectedTitle.Chapters.Last().ChapterNumber : 1;\r
                 }\r
                 else if (value == PointToPointMode.Seconds)\r
                 {\r