diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index e58254729a..8148f78680 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -262,11 +262,19 @@ namespace { Bnd_Box A; BRepBndLib::Add(a, A); + if (A.IsVoid()) { + return; + } + TopTools_ListIteratorOfListOfShape it(b); for (; it.More(); it.Next()) { Bnd_Box B; BRepBndLib::Add(it.Value(), B); + if (B.IsVoid()) { + continue; + } + if (A.Distance(B) < p) { c.Append(it.Value()); }