From: eap Date: Fri, 27 Feb 2009 11:04:47 +0000 (+0000) Subject: 0020183: EDF SMESH 966 : Mesh element info anomaly X-Git-Tag: V4_1_5rc1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25664a1b4ddcfe067d8757f7dabf0f528c5dce1a;p=modules%2Fgui.git 0020183: EDF SMESH 966 : Mesh element info anomaly fix GetInputId(): prevent from out_of_range error if theOutId==myOut2InId.size() --- diff --git a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx index 7cd46041a..1efd06cdb 100755 --- a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx +++ b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx @@ -85,13 +85,9 @@ vtkIdType VTKViewer_ExtractUnstructuredGrid::GetInputId(int theOutId) const if ( myCellIds.empty() && myCellTypes.empty() ) return theOutId; - if ( myOut2InId.empty() || theOutId > (int)myOut2InId.size() ) + if ( theOutId<0 || theOutId >= (int)myOut2InId.size() ) return -1; -#if defined __GNUC_2__ return myOut2InId[theOutId]; -#else - return myOut2InId.at(theOutId); -#endif } vtkIdType VTKViewer_ExtractUnstructuredGrid::GetOutputId(int theInId) const{