Fix crash in OCR

This commit is contained in:
Nikolaj Olsson 2020-06-01 16:29:50 +02:00
parent 104451abba
commit a9cee070cd
2 changed files with 3 additions and 1 deletions

View File

@ -1431,6 +1431,7 @@ $HorzAlign = Center
ItalicFactor = 0.2f;
LineOcrLinesToAutoGuess = 100;
LineOcrMaxErrorPixels = 45;
LastBinaryImageCompareDb = "Latin+Latin";
BinaryAutoDetectBestDb = true;
CaptureTopAlign = false;
UnfocusedAttentionBlinkCount = 50;

View File

@ -8757,7 +8757,8 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
return;
}
if (Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb.Contains("+"))
if (Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb != null &&
Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb.Contains("+"))
{
s += "+" + Configuration.Settings.VobSubOcr.LastBinaryImageCompareDb.Split('+')[1];
}