From 6a9d7e7da20611c1fa409c8aaeaadbb2dee780b6 Mon Sep 17 00:00:00 2001 From: Abhinav Shukla Date: Fri, 22 Jul 2016 17:54:32 -0700 Subject: [PATCH] Fixing segfault for empty OCR line --- src/lib_ccx/ocr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_ccx/ocr.c b/src/lib_ccx/ocr.c index 964ebdb5..1999c440 100644 --- a/src/lib_ccx/ocr.c +++ b/src/lib_ccx/ocr.c @@ -207,7 +207,7 @@ char* ocr_bitmap(void* arg, png_color *palette,png_byte *alpha, unsigned char* i text_out = TessBaseAPIGetUTF8Text(ctx->api); // Begin color detection - if(ccx_options.dvbcolor) + if(ccx_options.dvbcolor && strlen(text_out)>0) { float h0 = -100; int written_tag = 0;