From 78b5fec65e4deb7e9f77e1da32fe911766b1d5ae Mon Sep 17 00:00:00 2001 From: ivandrofly Date: Fri, 22 May 2015 19:40:14 +0100 Subject: [PATCH] Fixed possible bug --- src/Logic/Subtitle.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logic/Subtitle.cs b/src/Logic/Subtitle.cs index ba60da3a3..48ea48d02 100644 --- a/src/Logic/Subtitle.cs +++ b/src/Logic/Subtitle.cs @@ -291,7 +291,7 @@ namespace Nikse.SubtitleEdit.Logic for (int i = 0; i < Paragraphs.Count - 1; i++) { Paragraph p = Paragraphs[i]; - Paragraph next = Paragraphs[i + 1]; + Paragraph next = GetParagraphOrDefault(i + 1); if (next != null && (p.EndFrame == next.StartFrame || p.EndFrame == next.StartFrame + 1)) p.EndFrame = next.StartFrame - 1; }