Part: 2doffset fix crash by chacking for null shape before adding with builder.Add()

This commit is contained in:
mwganson
2022-03-10 13:08:23 -06:00
committed by Uwe
parent 2a28ad5cef
commit fc617e1524

View File

@@ -3130,7 +3130,9 @@ TopoDS_Shape TopoShape::makeOffset2D(double offset, short joinType, bool fill, b
BRep_Builder builder;
builder.MakeCompound(result);
for(TopoDS_Shape &sh : shapesToReturn) {
builder.Add(result, sh);
if (!sh.IsNull()) {
builder.Add(result, sh);
}
}
return TopoDS_Shape(std::move(result));
}