Commit 2c2e477c authored by berak's avatar berak

text: don't delete null pointer in ocr_tesseract.cpp

parent d8673bd7
......@@ -200,7 +200,8 @@ public:
char *outText;
outText = tess.GetUTF8Text();
output = string(outText);
delete [] outText;
if (outText != NULL)
delete [] outText;
if ( (component_rects != NULL) || (component_texts != NULL) || (component_confidences != NULL) )
{
......@@ -227,8 +228,8 @@ public:
delete[] word;
} while (ri->Next(level));
delete ri;
}
delete ri;
}
tess.Clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment