]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Ref #250 - Fatal error after Join all selections operation
authornds <nds@opencascade.com>
Thu, 19 Dec 2013 08:41:25 +0000 (08:41 +0000)
committernds <nds@opencascade.com>
Thu, 19 Dec 2013 08:41:25 +0000 (08:41 +0000)
Code correction in order to avoid an exception, caused by the incorrect index of the section.

src/HYDROCurveCreator/CurveCreator_Profile.cxx

index 08ad8a4bee793359d7efb28c615f6e03828af42b..bcfc8fb0f816e884bc5ab8e63daa6fd24a4b7228 100644 (file)
@@ -71,7 +71,9 @@ bool CurveCreator_Profile::clearInternal()
     myDisplayer->eraseAll( true );
 
   // Delete all allocated data.
-  mySections[ 0 ]->myPoints.clear();
+  CurveCreator_Section* aSection = getSection( 0 );
+  if ( aSection )
+    aSection->myPoints.clear();
 
   return true;
 }
@@ -135,7 +137,7 @@ bool CurveCreator_Profile::addPointsInternal( const CurveCreator::SectionsMap &t
 {
   bool res = false;
 
-  CurveCreator_Section* aSection = mySections.at( 0 );
+  CurveCreator_Section* aSection = getSection( 0 );
   if( !aSection )
     return res;
 
@@ -209,7 +211,7 @@ bool CurveCreator_Profile::setPointInternal( const CurveCreator::SectionsMap &th
   }
 
   int anISection = 0;
-  CurveCreator_Section* aSection = mySections.at( anISection );
+  CurveCreator_Section* aSection = getSection( anISection );
   if( !aSection )
     return aRes;