From: eap Date: Thu, 6 May 2010 13:00:52 +0000 (+0000) Subject: PAL21729 TC5.1.4: Problem with saving study after "Convert to quadratic" operation X-Git-Tag: V5_1_4rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ba7955c3b57c87c278189f2e8f593c0893d3066;p=modules%2Fsmesh.git PAL21729 TC5.1.4: Problem with saving study after "Convert to quadratic" operation * Protect Save() from pb with submeshes with invalid id (without corresponding shape) --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 73588098f..9e9b90e4b 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -3048,6 +3048,8 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, if ( nbNodes == 0 ) continue; int aShapeID = (*itSubM).first; + if ( aShapeID < 1 || aShapeID > mySMESHDSMesh->MaxShapeIndex() ) + continue; int aShapeType = mySMESHDSMesh->IndexToShape( aShapeID ).ShapeType(); // write only SMDS_FacePosition and SMDS_EdgePosition switch ( aShapeType ) {