diff --git a/ccmain/cube_control.cpp b/ccmain/cube_control.cpp index 8270e4f350..50f7512dd1 100644 --- a/ccmain/cube_control.cpp +++ b/ccmain/cube_control.cpp @@ -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; diff --git a/cube/char_samp.cpp b/cube/char_samp.cpp index 4b9887e4e4..f55735be0e 100644 --- a/cube/char_samp.cpp +++ b/cube/char_samp.cpp @@ -166,7 +166,6 @@ CharSamp *CharSamp::FromCharDumpFile(CachedFile *fp) { // load the Bmp8 part if (char_samp->LoadFromCharDumpFile(fp) == false) { delete char_samp; - delete [] label32; return NULL; } return char_samp;