Avoid too often Standard_OutOfRange

This commit is contained in:
eap 2014-04-28 14:06:27 +04:00
parent 9c9403c272
commit 12d0e1ecd2

View 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 )
{