baseapi: Simplify code

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2017-05-13 12:14:29 +02:00
parent 69296f8d18
commit 5dc4af62fb

View File

@ -2064,12 +2064,10 @@ void TessBaseAPI::End() {
delete paragraph_models_;
paragraph_models_ = NULL;
}
if (tesseract_ != NULL) {
delete tesseract_;
if (osd_tesseract_ == tesseract_)
osd_tesseract_ = NULL;
tesseract_ = NULL;
}
if (osd_tesseract_ == tesseract_)
osd_tesseract_ = nullptr;
delete tesseract_;
tesseract_ = nullptr;
delete osd_tesseract_;
osd_tesseract_ = NULL;
delete equ_detect_;