1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

SALOME_37951_SIGSEGV_MakeVertexInsideFace Fixed exceptions with loading null curve and using out of range index. By K.Leontev.

This commit is contained in:
jfa 2023-10-17 10:06:58 +01:00
parent 2261172c3b
commit c84a97e12f
2 changed files with 7 additions and 2 deletions

View File

@ -76,7 +76,10 @@ void BRepAdaptor_Curve2d::Initialize(const TopoDS_Edge& E,
myFace = F;
Standard_Real pf,pl;
const Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(E,F,pf,pl);
Geom2dAdaptor_Curve::Load(PC,pf,pl);
if (PC)
{
Geom2dAdaptor_Curve::Load(PC,pf,pl);
}
}
//=======================================================================

View File

@ -442,8 +442,10 @@ static Standard_Boolean FindCoordBounds(const TopTools_SequenceOfShape& theFaces
if (aPairSeq.Length() == 2)
theMinCoord = aPairSeq(2).first - thePeriod;
else
else if (aPairSeq.Length() > 0)
theMinCoord = aPairSeq(1).first;
else
return Standard_False;
theMaxCoord = aPairSeq(1).second;
return Standard_True;