Degenerated bspline leads to null dereference
Fix BSpline curve check and improve exception handling in TransferBSplineCurve
//: 5 BSplineC = new Geom_BSplineCurve(Poles, Weight, Knot, Mult, Degree);
}
- // sln 29.12.2001 OCC90 : If curve can not be created do nothing
- if (!checkBSplineCurve(this, start, Knot, Weight))
+ // If curve can not be created do nothing
+ if (Poles.Size() < 2 || !checkBSplineCurve(this, start, Knot, Weight))
+ {
return BSplineRes;
+ }
{
try
anException.Print(std::cout);
#endif
(void)anException;
+ return BSplineRes;
}
}