Fixed possible crash in format TMPlayer

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@2095 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2013-09-17 15:51:20 +00:00
parent 746babf4e2
commit 2d01b78a22

View File

@ -72,6 +72,8 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
{
bool success = false;
if (regex.Match(line).Success)
{
try
{
string s = line;
if (line.Length > 9 && line[8] == ' ')
@ -100,6 +102,11 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
success = true;
}
}
catch
{
_errorCount++;
}
}
if (!success)
_errorCount++;
}