mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 07:29:07 +08:00
Fix CID 1385633 (Dereference before null check)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
af72ad77e8
commit
e2135de022
@ -210,11 +210,13 @@ ELIST_LINK *ELIST_ITERATOR::forward() {
|
|||||||
cycle_pt = next;
|
cycle_pt = next;
|
||||||
current = next;
|
current = next;
|
||||||
}
|
}
|
||||||
|
#ifndef NDEBUG
|
||||||
|
if (!current)
|
||||||
|
NULL_DATA.error ("ELIST_ITERATOR::forward", ABORT, nullptr);
|
||||||
|
#endif
|
||||||
next = current->next;
|
next = current->next;
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (!current)
|
|
||||||
NULL_DATA.error ("ELIST_ITERATOR::forward", ABORT, nullptr);
|
|
||||||
if (!next)
|
if (!next)
|
||||||
NULL_NEXT.error ("ELIST_ITERATOR::forward", ABORT,
|
NULL_NEXT.error ("ELIST_ITERATOR::forward", ABORT,
|
||||||
"This is: %p Current is: %p", this, current);
|
"This is: %p Current is: %p", this, current);
|
||||||
|
Loading…
Reference in New Issue
Block a user