Commit 7b4cdd5d authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1566 from berak:ocrtesseract

parents ced5aa76 2c2e477c
...@@ -200,7 +200,8 @@ public: ...@@ -200,7 +200,8 @@ public:
char *outText; char *outText;
outText = tess.GetUTF8Text(); outText = tess.GetUTF8Text();
output = string(outText); output = string(outText);
delete [] outText; if (outText != NULL)
delete [] outText;
if ( (component_rects != NULL) || (component_texts != NULL) || (component_confidences != NULL) ) if ( (component_rects != NULL) || (component_texts != NULL) || (component_confidences != NULL) )
{ {
...@@ -227,8 +228,8 @@ public: ...@@ -227,8 +228,8 @@ public:
delete[] word; delete[] word;
} while (ri->Next(level)); } while (ri->Next(level));
delete ri;
} }
delete ri;
} }
tess.Clear(); 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