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 b47e6723dc
commit 72e06ae529

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));
}