Fixed issue 1304

This commit is contained in:
Ray Smith 2014-10-07 09:24:24 -07:00
parent bfd2cb83d5
commit 26235d69e8

View File

@ -926,6 +926,7 @@ TabVector* TabVector::VerticalTextlinePartner() {
total_widths += box.width(); total_widths += box.width();
prev_bbox = bbox; prev_bbox = bbox;
} }
if (num_unmatched + num_matched == 0) return NULL;
double avg_width = total_widths * 1.0 / (num_unmatched + num_matched); double avg_width = total_widths * 1.0 / (num_unmatched + num_matched);
double max_gap = textord_tabvector_vertical_gap_fraction * avg_width; double max_gap = textord_tabvector_vertical_gap_fraction * avg_width;
int min_box_match = static_cast<int>((num_matched + num_unmatched) * int min_box_match = static_cast<int>((num_matched + num_unmatched) *