Handle(TColgp_HArray1OfPnt) points;
std::vector<gp_Pnt> aTmpPoints;
- CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin();
- CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end();
- const gp_Pnt aFirstPoint(
- *aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
- gp_Pnt aPoint = aFirstPoint;
- aTmpPoints.push_back(aPoint);
+
+ if( myPoints.size() > 0 )
+ {
+ CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin();
+ CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end();
+ const gp_Pnt aFirstPoint(
+ *aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
+ gp_Pnt aPoint = aFirstPoint;
+ aTmpPoints.push_back(aPoint);
+ }
for (; aPIt != aPItLast; aPIt += theDimension)
{