Skip to content

Commit f3c7a17

Browse files
committed
Fix CID 1395108 (Dereference after null check)
Let's hope that word->best_choice is never NULL. Overwise both the old and the new code would abort with SIGSEGV. Signed-off-by: Stefan Weil <[email protected]>
1 parent 6092a8f commit f3c7a17

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/ccmain/adaptions.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ bool Tesseract::word_adaptable( //should we adapt?
3737
uint16_t mode) {
3838
if (tessedit_adaption_debug) {
3939
tprintf("Running word_adaptable() for %s rating %.4f certainty %.4f\n",
40-
word->best_choice == nullptr ? "" :
4140
word->best_choice->unichar_string().string(),
4241
word->best_choice->rating(), word->best_choice->certainty());
4342
}

0 commit comments

Comments
 (0)