PVS: V522 There might be dereferencing of a potential null pointer 'Py::Vector2d().getCxxObject()'
This commit is contained in:
@@ -82,9 +82,9 @@ int Hyperbola2dPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
Base::Vector2dPy::type_object(), &pV1,
|
||||
Base::Vector2dPy::type_object(), &pV2,
|
||||
Base::Vector2dPy::type_object(), &pV3)) {
|
||||
Base::Vector2d v1 = Py::Vector2d(pV1).getCxxObject()->value();
|
||||
Base::Vector2d v2 = Py::Vector2d(pV2).getCxxObject()->value();
|
||||
Base::Vector2d v3 = Py::Vector2d(pV3).getCxxObject()->value();
|
||||
Base::Vector2d v1 = Py::toVector2d(pV1);
|
||||
Base::Vector2d v2 = Py::toVector2d(pV2);
|
||||
Base::Vector2d v3 = Py::toVector2d(pV3);
|
||||
GCE2d_MakeHyperbola me(gp_Pnt2d(v1.x,v1.y),
|
||||
gp_Pnt2d(v2.x,v2.y),
|
||||
gp_Pnt2d(v3.x,v3.y));
|
||||
@@ -105,7 +105,7 @@ int Hyperbola2dPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!dd", keywords_cmm,
|
||||
Base::Vector2dPy::type_object(), &pV,
|
||||
&major, &minor)) {
|
||||
Base::Vector2d c = Py::Vector2d(pV).getCxxObject()->value();;
|
||||
Base::Vector2d c = Py::toVector2d(pV);
|
||||
GCE2d_MakeHyperbola me(gp_Ax2d(gp_Pnt2d(c.x,c.y), gp_Dir2d(0.0,1.0)),
|
||||
major, minor);
|
||||
if (!me.IsDone()) {
|
||||
|
||||
Reference in New Issue
Block a user