[CrashFix] Core: fix crash when Surface is null
This commit is contained in:
@@ -878,6 +878,8 @@ PyObject* TopoShapeFacePy::cutHoles(PyObject *args)
|
||||
Py::Object TopoShapeFacePy::getSurface() const
|
||||
{
|
||||
const TopoDS_Face& f = TopoDS::Face(getTopoShapePtr()->getShape());
|
||||
if (f.IsNull())
|
||||
return Py::Object(Py_None);
|
||||
BRepAdaptor_Surface adapt(f);
|
||||
Base::PyObjectBase* surface = nullptr;
|
||||
switch(adapt.GetType())
|
||||
|
||||
Reference in New Issue
Block a user