Salome HOME
OCCT dev version porting (6.7.2)
[modules/smesh.git] / src / StdMeshers / StdMeshers_Import_1D.cxx
index 6443d98d2a23591d79a0122618d80ffe358a98ec..ee9fe4ef1032964c27bb5edec130bb6795b04a36 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -569,7 +569,8 @@ namespace // INTERNAL STUFF
       aBuilder.MakeCompound( comp );
       shapeForSrcMesh = comp;
       for ( int iSub = 0; iSub < nbSubShapes; ++iSub )
-        aBuilder.Add( comp, pseudoSubShapes( subIndex+iSub ));
+        if ( subIndex+iSub <= pseudoSubShapes.Extent() )
+          aBuilder.Add( comp, pseudoSubShapes( subIndex+iSub ));
       TopExp_Explorer vExp( tgtMeshDS->ShapeToMesh(), TopAbs_VERTEX );
       aBuilder.Add( comp, vExp.Current() );
     }