aNbCoords += mySections[i]->myPoints.size();
}
} else {
- aNbCoords = mySections.at(theISection)->myPoints.size();
+ if ( ( theISection >= 0 ) && ( theISection < mySections.size() ) )
+ aNbCoords = mySections.at(theISection)->myPoints.size();
}
return aNbCoords/myDimension;
//=======================================================================
CurveCreator::Coordinates CurveCreator_Curve::getPoints( const int theISection ) const
{
- return mySections.at(theISection)->myPoints;
+ CurveCreator::Coordinates aCoords;
+ if ( ( theISection >= 0 ) && ( theISection < mySections.size() ) )
+ {
+ aCoords = mySections.at(theISection)->myPoints;
+ }
+ return aCoords;
}