diff --git a/src/Mod/Measure/App/Measurement.cpp b/src/Mod/Measure/App/Measurement.cpp index bd68cd5d9c..784685b687 100644 --- a/src/Mod/Measure/App/Measurement.cpp +++ b/src/Mod/Measure/App/Measurement.cpp @@ -331,6 +331,9 @@ double Measurement::length() const // Get the length of one edge TopoDS_Shape shape = getShape(*obj, (*subEl).c_str(), TopAbs_EDGE); + if (shape.IsNull()) { + continue; + } const TopoDS_Edge& edge = TopoDS::Edge(shape); BRepAdaptor_Curve curve(edge); @@ -365,8 +368,8 @@ double Measurement::length() const throw Base::RuntimeError( "Measurement - length - Curve type not currently handled"); } - } // end switch - } // end for + } + } } } return result;