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)
This commit is contained in:
eap 2010-05-06 13:00:52 +00:00
parent e2089449ad
commit 3ba7955c3b

View File

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