Skip to content

Commit

Permalink
+ allow to use copy() method for a null shape
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Mar 15, 2014
1 parent ea4abcb commit 66819d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Part/App/TopoShapePyImp.cpp
Expand Up @@ -165,8 +165,10 @@ PyObject* TopoShapePy::copy(PyObject *args)
return 0;
}

BRepBuilderAPI_Copy c(shape);
static_cast<TopoShapePy*>(cpy)->getTopoShapePtr()->_Shape = c.Shape();
if (!shape.IsNull()) {
BRepBuilderAPI_Copy c(shape);
static_cast<TopoShapePy*>(cpy)->getTopoShapePtr()->_Shape = c.Shape();
}
return cpy;
}

Expand Down

0 comments on commit 66819d9

Please sign in to comment.