File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1210,6 +1210,7 @@ float Tesseract::ClassifyBlobPlusOutlines(
1210
1210
C_BLOB* blob, STRING* best_str) {
1211
1211
C_OUTLINE_IT ol_it;
1212
1212
C_OUTLINE* first_to_keep = nullptr ;
1213
+ C_BLOB* local_blob = nullptr ;
1213
1214
if (blob != nullptr ) {
1214
1215
// Add the required outlines to the blob.
1215
1216
ol_it.set_to_list (blob->out_list ());
@@ -1219,7 +1220,8 @@ float Tesseract::ClassifyBlobPlusOutlines(
1219
1220
if (ok_outlines[i]) {
1220
1221
// This outline is to be added.
1221
1222
if (blob == nullptr ) {
1222
- blob = new C_BLOB (outlines[i]);
1223
+ local_blob = new C_BLOB (outlines[i]);
1224
+ blob = local_blob;
1223
1225
ol_it.set_to_list (blob->out_list ());
1224
1226
} else {
1225
1227
ol_it.add_before_stay_put (outlines[i]);
@@ -1232,7 +1234,7 @@ float Tesseract::ClassifyBlobPlusOutlines(
1232
1234
if (first_to_keep == nullptr ) {
1233
1235
// We created blob. Empty its outlines and delete it.
1234
1236
for (; !ol_it.empty (); ol_it.forward ()) ol_it.extract ();
1235
- delete blob ;
1237
+ delete local_blob ;
1236
1238
cert = -c2;
1237
1239
} else {
1238
1240
// Remove the outlines that we put in.
You can’t perform that action at this time.
0 commit comments