-// Copyright (C) 2007-2023 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
const TopoDS_Edge& anEdge = aWexp.Current();
if (!aUsedEmap.Add(anEdge)) continue;
BRepAdaptor_Curve2d aBAcurve2d (anEdge, theFace);
+ // Initialization of curve could fail in constructor,
+ // so we need to check if we actually have a curve here.
+ if (!aBAcurve2d.Curve())
+ {
+ continue;
+ }
+
Standard_Real aDelta = (aBAcurve2d.LastParameter() - aBAcurve2d.FirstParameter())/aNbSamples;
for (Standard_Integer ii = 0; ii < aNbSamples; ii++)
{