mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 15:39:04 +08:00
Fix issue reported by Coverity Scan
CID: 1375395 (Dereference after null check) Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
This commit is contained in:
parent
83a4eb3b44
commit
d4490af06d
@ -512,9 +512,11 @@ void RecodeBeamSearch::ContinueContext(const RecodeNode* prev, int index,
|
||||
(previous->duplicate || previous->code == null_char_)) {
|
||||
previous = previous->prev;
|
||||
}
|
||||
if (previous != nullptr) {
|
||||
prefix.Set(p, previous->code);
|
||||
full_code.Set(p, previous->code);
|
||||
}
|
||||
}
|
||||
if (prev != nullptr && !is_simple_text_) {
|
||||
if (top_n_flags_[prev->code] == top_n_flag) {
|
||||
if (prev_cont != NC_NO_DUP) {
|
||||
|
Loading…
Reference in New Issue
Block a user