Skip to content

Commit

Permalink
v.hull: fix null pointer dereference issues (#4524)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamDesai authored Oct 21, 2024
1 parent 870343f commit 5d4f7fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vector/v.hull/chull.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@ void CleanEdges(void)
e = edges;
DELETE(edges, e);
}
if (!edges)
return;
e = edges->next;
do {
if (e->delete) {
Expand All @@ -711,6 +713,8 @@ void CleanFaces(void)
f = faces;
DELETE(faces, f);
}
if (!faces)
return;
f = faces->next;
do {
if (f->visible) {
Expand Down Expand Up @@ -746,6 +750,8 @@ void CleanVertices(void)
v = vertices;
DELETE(vertices, v);
}
if (!vertices)
return;
v = vertices->next;
do {
if (v->mark && !v->onhull) {
Expand Down

0 comments on commit 5d4f7fb

Please sign in to comment.