Fix map invalidation reported by valgrind

This commit is contained in:
aothms
2021-02-21 16:37:33 +01:00
parent db44eaf221
commit a57f08a9da
+4 -2
View File
@@ -831,6 +831,10 @@ bool CgalKernel::process_extrusion(const cgal_face_t& bottom_face, const taxonom
}
auto p = external_edges.insert({ { i0, i1 }, { i, j} });
if (!p.second) {
// Mark as internal before erasure in external
// This is {i,j} at the time the edge use was inserted.
internal_edges.insert(p.first->second);
// not inserted, remove
external_edges.erase(p.first);
@@ -838,8 +842,6 @@ bool CgalKernel::process_extrusion(const cgal_face_t& bottom_face, const taxonom
// point_map. i is index in faces_to_extrude, j is segment index in wire.
internal_edges.insert({ i, j });
// This is {i,j} at the time the edge use was inserted.
internal_edges.insert(p.first->second);
}
}
i++;