Skip to content

Commit

Permalink
cube: Fix coverity warning caused by unneeded null pointer check
Browse files Browse the repository at this point in the history
Commit 03eec61 removed unneeded
null pointer checks after new, but missed one which now raises
a warning from coverity scan. Remove that one, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Dec 2, 2016
1 parent 4704fca commit 7e3ff36
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ccmain/cube_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,8 @@ bool Tesseract::init_cube_objects(bool load_combiner,
if (!tess_cube_combiner_->LoadCombinerNet()) {
delete cube_cntxt_;
cube_cntxt_ = NULL;
if (tess_cube_combiner_ != NULL) {
delete tess_cube_combiner_;
tess_cube_combiner_ = NULL;
}
delete tess_cube_combiner_;
tess_cube_combiner_ = NULL;
if (cube_debug_level > 0)
tprintf("Cube ERROR (Failed to instantiate TesseractCubeCombiner\n");
return false;
Expand Down

0 comments on commit 7e3ff36

Please sign in to comment.