From: ageay Date: Tue, 2 Apr 2013 06:28:11 +0000 (+0000) Subject: Debug of C. Bourcier X-Git-Tag: V6_main_FINAL~223 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf83ff992055ef137a93e4e9ed4ae84a6485185d;p=tools%2Fmedcoupling.git Debug of C. Bourcier --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index 1ce5d818c..246e4bef0 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -1577,9 +1577,16 @@ void IntermediateMED::orientFaces3D() if ( lfIt2 != linkFacesMap.end() ) { list & ff = lfIt2->second; - ff.erase( find( ff.begin(), ff.end(), badFace )); - if ( ff.empty() ) - linkFacesMap.erase( lfIt2 ); + list::iterator lfIt3 = find( ff.begin(), ff.end(), badFace ); + // check if badFace has been found, + // else we can't erase it + // case of degenerated face in edge + if (lfIt3 != ff.end()) + { + ff.erase( lfIt3 ); + if ( ff.empty() ) + linkFacesMap.erase( lfIt2 ); + } } } badFace->_reverse = true; // reverse