From: eap Date: Wed, 14 May 2014 09:17:58 +0000 (+0400) Subject: Fix a crash on geometry of http://www.salome-platform.org/forum/forum_10/670730490 X-Git-Tag: V7_4_0rc1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e430c16626d7d83e914924eee19942b2aedb5569;p=modules%2Fsmesh.git Fix a crash on geometry of http://www.salome-platform.org/forum/forum_10/670730490 --- diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index f7516247a..8b40fe2d9 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -2010,10 +2010,12 @@ namespace while ( nbFreeLinks > 0 ) { if ( iPolygon == _polygons.size() ) + { _polygons.resize( _polygons.size() + 1 ); + _polygons[ iPolygon ]._polyLinks.reserve( 20 ); + _polygons[ iPolygon ]._links.reserve( 20 ); + } _Face& polygon = _polygons[ iPolygon ]; - polygon._polyLinks.reserve( 20 ); - polygon._links.reserve( 20 ); _OrientedLink* curLink = 0; _Node* curNode; @@ -2274,11 +2276,6 @@ namespace _polygons[ iPolygon ]._polyLinks.clear(); break; } - if ( freeLinks.back() == &polygon._links.back() ) - { - freeLinks.pop_back(); - --nbFreeLinks; - } _polygons.pop_back(); usedFaceIDs.erase( curFace ); continue;