Salome HOME
Feature #102: Display of Lambert coordinates.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileOp.cxx
index efe8572c2f7ac80496e8b6914cea411413dcbaf5..de66285269f83ba04f9ae2a35b6525673498fd6c 100644 (file)
@@ -182,6 +182,12 @@ bool HYDROGUI_ProfileOp::processApply( int& theUpdateFlags,
   HYDROData_ProfileUZ::PointsList aProfileParamPoints;
 
   CurveCreator::Coordinates aCurveCoords = myProfile->getPoints( 0 );
+  if ( aCurveCoords.size() <= 2 )
+  {
+    theErrorMsg = tr( "NUMBER_OF_PROFILE_POINTS_INCORRECT" );
+    return false;
+  }
+
   for ( int k = 0 ; k + 1 < aCurveCoords.size() ; k++ )
   {
     HYDROData_ProfileUZ::Point aProfileParamPoint;