From 81537c9481cb9e7869421b278331bfe876878368 Mon Sep 17 00:00:00 2001 From: niksedk Date: Wed, 27 Feb 2013 20:21:11 +0000 Subject: [PATCH] Fixed load of format QubeMasterImort git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1682 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Logic/SubtitleFormats/PE2.cs | 4 +++- src/Logic/SubtitleFormats/QubeMasterImport.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Logic/SubtitleFormats/PE2.cs b/src/Logic/SubtitleFormats/PE2.cs index c9663d34c..066da313c 100644 --- a/src/Logic/SubtitleFormats/PE2.cs +++ b/src/Logic/SubtitleFormats/PE2.cs @@ -111,6 +111,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats var tc = DecodeTimeCode(parts); paragraph.EndTime = tc; subtitle.Paragraphs.Add(paragraph); + if (paragraph.StartTime.TotalMilliseconds < 0.001) + _errorCount++; paragraph = new Paragraph(); expecting = ExpectingLine.TimeStart; } @@ -132,7 +134,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats } } } - else if (line.Trim().Length > 0) + else if (line.Trim().Length > 0 && line != "#PE2 Format file") { _errorCount++; } diff --git a/src/Logic/SubtitleFormats/QubeMasterImport.cs b/src/Logic/SubtitleFormats/QubeMasterImport.cs index bf28d181e..1cafa921c 100644 --- a/src/Logic/SubtitleFormats/QubeMasterImport.cs +++ b/src/Logic/SubtitleFormats/QubeMasterImport.cs @@ -101,7 +101,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats subtitle.Paragraphs.Add(p); else _errorCount++; - p = null; + p = new Paragraph(); } } else if (line.Trim().Length > 0 && p != null)