FIX: crash when slicing(15%, generate perimeter)

github: 5037 and jira: 8182
Change-Id: I6719dc0cb4e5de808da14f9911cec19d4db9be3f
This commit is contained in:
zhimin.zeng 2024-10-22 19:41:35 +08:00 committed by Lane.Wei
parent b296537bbe
commit 10d576a301
1 changed files with 9 additions and 7 deletions

View File

@ -667,6 +667,8 @@ void annotate_inside_outside(VD &vd, const Lines &lines)
// Set a VertexCategory, verify validity of the operation.
auto annotate_vertex = [](const VD::vertex_type *vertex, VertexCategory new_vertex_category) {
if (vertex == nullptr)
return;
#ifndef NDEBUG
VertexCategory vc = vertex_category(vertex);
assert(vc == VertexCategory::Unknown || vc == new_vertex_category);