Fixing segfault for empty OCR line

This commit is contained in:
Abhinav Shukla 2016-07-22 17:54:32 -07:00
parent 22ec6b96b2
commit 6a9d7e7da2

View File

@ -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;