Skip to content

Commit 7e3ff36

Browse files
committed
cube: Fix coverity warning caused by unneeded null pointer check
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 <[email protected]>
1 parent 4704fca commit 7e3ff36

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ccmain/cube_control.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,8 @@ bool Tesseract::init_cube_objects(bool load_combiner,
182182
if (!tess_cube_combiner_->LoadCombinerNet()) {
183183
delete cube_cntxt_;
184184
cube_cntxt_ = NULL;
185-
if (tess_cube_combiner_ != NULL) {
186-
delete tess_cube_combiner_;
187-
tess_cube_combiner_ = NULL;
188-
}
185+
delete tess_cube_combiner_;
186+
tess_cube_combiner_ = NULL;
189187
if (cube_debug_level > 0)
190188
tprintf("Cube ERROR (Failed to instantiate TesseractCubeCombiner\n");
191189
return false;

0 commit comments

Comments
 (0)