Skip to content

Commit

Permalink
baseapi: Simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed May 13, 2017
1 parent 69296f8 commit 5dc4af6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions api/baseapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down

0 comments on commit 5dc4af6

Please sign in to comment.