Part: [skip ci] fix crash when trying to convert null shape to nurbs

This commit is contained in:
wmayer
2020-10-09 18:54:57 +02:00
parent 11afaaea68
commit d76124b61e

View File

@@ -3067,6 +3067,9 @@ TopoDS_Shape TopoShape::mirror(const gp_Ax2& ax2) const
TopoDS_Shape TopoShape::toNurbs() const
{
if (this->_Shape.IsNull())
Standard_Failure::Raise("Cannot convert null shape to NURBS");
BRepBuilderAPI_NurbsConvert mkNurbs(this->_Shape);
return mkNurbs.Shape();
}