Skip to content

Commit

Permalink
Fixed crash on debugging classifier with a shapetable present
Browse files Browse the repository at this point in the history
  • Loading branch information
theraysmith committed May 14, 2015
1 parent 4598061 commit d91df98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classify/tessclassifier.cpp
Expand Up @@ -69,8 +69,9 @@ int TessClassifier::DisplayClassifyAs(
const TrainingSample& sample, Pix* page_pix, int unichar_id, int index,
PointerVector<ScrollView>* windows) {
int shape_id = unichar_id;
if (GetShapeTable() != NULL)
shape_id = BestShapeForUnichar(sample, page_pix, unichar_id, NULL);
// TODO(rays) Fix this so it works with both flat and real shapetables.
// if (GetShapeTable() != NULL)
// shape_id = BestShapeForUnichar(sample, page_pix, unichar_id, NULL);
if (shape_id < 0) return index;
if (UnusedClassIdIn(classify_->PreTrainedTemplates, shape_id)) {
tprintf("No built-in templates for class/shape %d\n", shape_id);
Expand Down

0 comments on commit d91df98

Please sign in to comment.