]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Avoid too often Standard_OutOfRange
authoreap <eap@opencascade.com>
Mon, 28 Apr 2014 10:06:27 +0000 (14:06 +0400)
committereap <eap@opencascade.com>
Mon, 28 Apr 2014 10:06:27 +0000 (14:06 +0400)
src/SMESHDS/SMESHDS_Mesh.cxx

index 089e9feecf52d3d2efe338179d855ae3a2eb1aa2..6766fbda76a822021b0426e748ef5dd874b84b67 100644 (file)
@@ -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 )
   {