From: nds Date: Thu, 19 Dec 2013 08:41:25 +0000 (+0000) Subject: Ref #250 - Fatal error after Join all selections operation X-Git-Tag: BR_hydro_v_0_6~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6ba0a1ff0385b98b89766f76af5d6dc4cc3d7c83;p=modules%2Fhydro.git Ref #250 - Fatal error after Join all selections operation Code correction in order to avoid an exception, caused by the incorrect index of the section. --- diff --git a/src/HYDROCurveCreator/CurveCreator_Profile.cxx b/src/HYDROCurveCreator/CurveCreator_Profile.cxx index 08ad8a4b..bcfc8fb0 100644 --- a/src/HYDROCurveCreator/CurveCreator_Profile.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Profile.cxx @@ -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;