Fix dereference after null check CID 83028

This commit is contained in:
_aLfa_ 2014-11-22 15:47:12 +01:00
parent 21948f9eb5
commit ff78636abd

View File

@ -2319,6 +2319,11 @@ namespace Nikse.SubtitleEdit.Forms
private static NOcrChar NOcrFindBestMatchNew(ImageSplitterItem targetItem, int topMargin, out bool italic, NOcrDb nOcrDb, bool tryItalicScaling, bool deepSeek)
{
italic = false;
if (nOcrDb == null)
{
return null;
}
var nbmp = targetItem.NikseBitmap;
int index;
foreach (NOcrChar oc in nOcrDb.OcrCharacters)