Part: BSpline creation method corrected as per Werner's indication

==================================================================

http://forum.freecadweb.org/viewtopic.php?f=10&t=19700
This commit is contained in:
Abdullah Tahiri
2017-01-12 22:44:07 +01:00
parent c9de3687af
commit 1076b70056

View File

@@ -75,9 +75,14 @@ int BSplineCurvePy::PyInit(PyObject* args, PyObject* /*kwd*/)
// poles, [ periodic, degree, interpolate ]
obj = buildFromPoles(args);
if (obj != 0)
if (obj) {
Py_DECREF(obj);
return 0;
}
else if (PyErr_ExceptionMatches(PartExceptionOCCError)) {
return -1;
}
PyErr_SetString(PyExc_TypeError, "B-Spline constructor accepts:\n"
"-- poles, [ periodic, degree, interpolate ]\n"