mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 14:41:36 +08:00
Test for empty choices at ChoiceIterator (fix issue 826)
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@840 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
80040b834b
commit
16e80c06ee
@ -321,7 +321,7 @@ ChoiceIterator::ChoiceIterator(const LTRResultIterator& result_it) {
|
||||
PAGE_RES_IT res_it(*result_it.it_);
|
||||
WERD_CHOICE* best_choice = word_res_->best_choice;
|
||||
BLOB_CHOICE_LIST_CLIST* choices = best_choice->blob_choices();
|
||||
if (choices != NULL) {
|
||||
if (choices != NULL && !choices->empty()) {
|
||||
BLOB_CHOICE_LIST_C_IT blob_choices_it(choices);
|
||||
for (int blob = 0; blob < result_it.blob_index_; ++blob)
|
||||
blob_choices_it.forward();
|
||||
|
Loading…
Reference in New Issue
Block a user