cube: Fix coverity warning caused by unneeded null pointer check

Commit 03eec61a2f 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>
This commit is contained in:
Stefan Weil 2016-12-02 22:25:00 +01:00
parent 4704fcacb1
commit 7e3ff36080

View File

@ -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;