]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Tue, 9 Sep 2008 17:31:44 +0000 (17:31 +0000)
committersr55 <sr55.hb@outlook.com>
Tue, 9 Sep 2008 17:31:44 +0000 (17:31 +0000)
- Fix in CalculateDuration. Crash caused by end chapter dropdown menu not getting re-populated before calculate duration run. See:
http://forum.handbrake.fr/viewtopic.php?f=12&t=7050

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1683 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/frmMain.cs

index e05ea9c1a24784449588ed1b19725a1a29f4ee2f..bd51c7da6288ebe3d40671e0d5b03880aae4c90d 100644 (file)
@@ -1417,6 +1417,9 @@ namespace Handbrake
 \r
                 int position = start_chapter - 1;\r
 \r
+                if (end_chapter > selectedTitle.Chapters.Count)\r
+                    end_chapter = selectedTitle.Chapters.Count;\r
+\r
                 while (position != end_chapter)\r
                 {\r
                     TimeSpan dur = selectedTitle.Chapters[position].Duration;\r