Crash fixed by checking IsNull().
Handle(Geom_CartesianPoint) StepToGeom::MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP,
const StepData_Factors& theLocalFactors)
{
- if (SP->NbCoordinates() == 3)
+ if (!SP.IsNull() && SP->NbCoordinates() == 3)
{
const Standard_Real LF = theLocalFactors.LengthFactor();
const Standard_Real X = SP->CoordinatesValue(1) * LF;
//:S4136 Standard_Real preci = BRepAPI::Precision();
const Handle(StepShape_VertexPoint) VP = Handle(StepShape_VertexPoint)::DownCast(aVertex);
const Handle(StepGeom_Point) P = VP->VertexGeometry();
+ if (P.IsNull()) {
+ myError = StepToTopoDS_TranslateVertexOther;
+ done = Standard_False;
+ return;
+ }
const Handle(StepGeom_CartesianPoint) P1 = Handle(StepGeom_CartesianPoint)::DownCast(P);
Handle(Geom_CartesianPoint) P2 = StepToGeom::MakeCartesianPoint (P1, theLocalFactors);
BRep_Builder B;