From: eap Date: Fri, 27 Feb 2009 11:05:33 +0000 (+0000) Subject: 0020183: EDF SMESH 966 : Mesh element info anomaly X-Git-Tag: V5_1_1a2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=68402e4095478687d1b50398eda5d13eec0bcf85;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{