summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-06-01 15:06:46 +0000
committersr55 <[email protected]>2013-06-01 15:06:46 +0000
commit0b38ee2d844b915314b9731fd2b2ea4906e6439b (patch)
treee7c7a9a9f170fa2a8d6b38dd70161dc41e1bae25 /win/CS/HandBrakeWPF
parentca5ac69f4f80e86e396f0c21aa5a16c364997b89 (diff)
WinGui: Don't crash if a corrupted source file causes the duration to be mis-detected. Note, in this case duration of the title / chapters will show as 00:00:00 and no chapters may display.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5539 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 5fad2dca6..fd896f197 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -812,7 +812,7 @@ namespace HandBrakeWPF.ViewModels
this.SelectedStartPoint = 1;
- this.SelectedEndPoint = selectedTitle.Chapters.Last().ChapterNumber;
+ this.SelectedEndPoint = selectedTitle.Chapters != null && selectedTitle.Chapters.Count > 0 ? selectedTitle.Chapters.Last().ChapterNumber : 1;
}
else if (value == PointToPointMode.Seconds)
{