From 12d0e1ecd279895b1ed9484e15309984d4f06ded Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 28 Apr 2014 14:06:27 +0400 Subject: [PATCH] Avoid too often Standard_OutOfRange --- src/SMESHDS/SMESHDS_Mesh.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ) { -- 2.39.2