mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-01 17:36:21 +03: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:
parent
425f88e63a
commit
67bd61d4d3
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user