+ check for null shape before calling BRep_Tool::IsClosed
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5379 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
@@ -1030,6 +1030,8 @@ PyObject* TopoShapePy::isClosed(PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return NULL;
|
||||
try {
|
||||
if (getTopoShapePtr()->_Shape.IsNull())
|
||||
Standard_Failure::Raise("Cannot determine the 'Closed'' flag of an empty shape");
|
||||
return Py_BuildValue("O", (getTopoShapePtr()->isClosed() ? Py_True : Py_False));
|
||||
}
|
||||
catch (...) {
|
||||
|
||||
Reference in New Issue
Block a user