Skip to content

Commit 7910a76

Browse files
committed
Fix CID 1164567 (Dereference after null check)
It looks like the check cblob_ptr != nullptr is not needed. If cblob_ptr were NULL, we would have seen crashes in compute_bounding_box. Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent f3c7a17 commit 7910a76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ccstruct/blobbox.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void BLOBNBOX::merge( //merge blobs
103103
// Merge this with other, taking the outlines from other.
104104
// Other is not deleted, but left for the caller to handle.
105105
void BLOBNBOX::really_merge(BLOBNBOX* other) {
106-
if (cblob_ptr != nullptr && other->cblob_ptr != nullptr) {
106+
if (other->cblob_ptr != nullptr) {
107107
C_OUTLINE_IT ol_it(cblob_ptr->out_list());
108108
ol_it.add_list_after(other->cblob_ptr->out_list());
109109
}

0 commit comments

Comments
 (0)