From 68402e4095478687d1b50398eda5d13eec0bcf85 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 27 Feb 2009 11:05:33 +0000 Subject: [PATCH] 0020183: EDF SMESH 966 : Mesh element info anomaly fix GetInputId(): prevent from out_of_range error if theOutId==myOut2InId.size() --- src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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{ -- 2.39.2