PD: Fix possible crash in up to shape

This commit is contained in:
wmayer
2024-12-11 19:12:49 +01:00
committed by Chris Hennes
parent 33722a5c72
commit 0017bc730a

View File

@@ -141,8 +141,13 @@ TopoShape FeatureExtrude::makeShellFromUpToShape(TopoShape shape, TopoShape sket
dir = -dir;
cfaces = Part::findAllFacesCutBy(shape, sketchshape, dir);
}
struct Part::cutTopoShapeFaces *nearFace;
struct Part::cutTopoShapeFaces *farFace;
if (cfaces.empty()) {
return shape;
}
struct Part::cutTopoShapeFaces *nearFace {};
struct Part::cutTopoShapeFaces *farFace {};
nearFace = farFace = &cfaces.front();
for (auto &face : cfaces) {
if (face.distsq > farFace->distsq) {