From c3f88ed11326818ac837a03b0e11a8305bd51b82 Mon Sep 17 00:00:00 2001 From: Martin Ettl Date: Sun, 12 Oct 2014 11:57:18 +0000 Subject: [PATCH] 1341: [PATCH] Fix potential null pointer dereference in ccmain/paragraphs.cpp --- ccmain/paragraphs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccmain/paragraphs.cpp b/ccmain/paragraphs.cpp index 17f2d73994..da4cdc208f 100644 --- a/ccmain/paragraphs.cpp +++ b/ccmain/paragraphs.cpp @@ -2400,8 +2400,8 @@ void InitializeTextAndBoxesPreRecognition(const MutableIterator &it, } word_res = page_res_it.forward(); } while (page_res_it.row() == this_row); - info->lword_box = lword->word->bounding_box(); - info->rword_box = rword->word->bounding_box(); + if(lword) info->lword_box = lword->word->bounding_box(); + if(rword) info->rword_box = rword->word->bounding_box(); }