mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
Data Exchange - IGES Import Degenerated BSpline crash #368
Degenerated bspline leads to null dereference Fix BSpline curve check and improve exception handling in TransferBSplineCurve
This commit is contained in:
@@ -1130,9 +1130,11 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::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
|
||||
@@ -1151,6 +1153,7 @@ Handle(Geom_Curve) IGESToBRep_BasicCurve::TransferBSplineCurve(
|
||||
anException.Print(std::cout);
|
||||
#endif
|
||||
(void)anException;
|
||||
return BSplineRes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user