From: eap Date: Mon, 28 Apr 2014 10:06:27 +0000 (+0400) Subject: Avoid too often Standard_OutOfRange X-Git-Tag: V7_4_0rc1~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=12d0e1ecd279895b1ed9484e15309984d4f06ded;p=modules%2Fsmesh.git Avoid too often Standard_OutOfRange --- diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index 089e9feec..6766fbda7 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -1376,7 +1376,8 @@ const TopoDS_Shape& SMESHDS_Mesh::IndexToShape(int ShapeIndex) const { try { - return myIndexToShape.FindKey(ShapeIndex); + if ( ShapeIndex > 0 ) + return myIndexToShape.FindKey(ShapeIndex); } catch ( Standard_OutOfRange ) {