mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-04 09:49:16 +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,8 +512,10 @@ void RecodeBeamSearch::ContinueContext(const RecodeNode* prev, int index,
|
||||
(previous->duplicate || previous->code == null_char_)) {
|
||||
previous = previous->prev;
|
||||
}
|
||||
prefix.Set(p, previous->code);
|
||||
full_code.Set(p, previous->code);
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user