From 25664a1b4ddcfe067d8757f7dabf0f528c5dce1a Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 27 Feb 2009 11:04:47 +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