PVS: V522 There might be dereferencing of a potential null pointer 'Py::Vector2d().getCxxObject()'

This commit is contained in:
wmayer
2019-02-18 00:00:10 +01:00
parent 34da2b5d4f
commit 5d8cd9dba4
13 changed files with 61 additions and 51 deletions

View File

@@ -708,7 +708,7 @@ PyObject* Curve2dPy::parameter(PyObject *args)
PyObject *p;
if (!PyArg_ParseTuple(args, "O!", Base::Vector2dPy::type_object(), &p))
return 0;
Base::Vector2d v = Py::Vector2d(p).getCxxObject()->value();
Base::Vector2d v = Py::toVector2d(p);
gp_Pnt2d pnt(v.x,v.y);
Geom2dAPI_ProjectPointOnCurve ppc(pnt, c);
double val = ppc.LowerDistanceParameter();