Part: Py API: fix memory leak in Part.Vertex.Point

fix #2728
This commit is contained in:
DeepSOIC 2016-10-07 16:06:25 +03:00 committed by Yorik van Havre
parent 18302203cb
commit 5936a2db82

View File

@ -178,7 +178,7 @@ Py::Object TopoShapeVertexPy::getPoint(void) const
{
const TopoDS_Vertex& v = TopoDS::Vertex(getTopoShapePtr()->getShape());
gp_Pnt p = BRep_Tool::Pnt(v);
return Py::Object(new Base::VectorPy(new Base::Vector3d(p.X(),p.Y(),p.Z())));
return Py::asObject(new Base::VectorPy(new Base::Vector3d(p.X(),p.Y(),p.Z())));
}
PyObject *TopoShapeVertexPy::getCustomAttributes(const char* /*attr*/) const