Code correction in order to avoid an exception, caused by the incorrect index of the section.
myDisplayer->eraseAll( true );
// Delete all allocated data.
- mySections[ 0 ]->myPoints.clear();
+ CurveCreator_Section* aSection = getSection( 0 );
+ if ( aSection )
+ aSection->myPoints.clear();
return true;
}
{
bool res = false;
- CurveCreator_Section* aSection = mySections.at( 0 );
+ CurveCreator_Section* aSection = getSection( 0 );
if( !aSection )
return res;
}
int anISection = 0;
- CurveCreator_Section* aSection = mySections.at( anISection );
+ CurveCreator_Section* aSection = getSection( anISection );
if( !aSection )
return aRes;