From 7bca9a895bf6498889119297c55a7ff931cfe377 Mon Sep 17 00:00:00 2001 From: rkv Date: Thu, 28 Dec 2006 10:49:21 +0000 Subject: [PATCH] GetElemObjId() method fixed --- src/VTKViewer/VTKViewer_GeometryFilter.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index 420c1a1d3..e1f542850 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -815,7 +815,8 @@ VTKViewer_GeometryFilter vtkIdType VTKViewer_GeometryFilter::GetElemObjId( int theVtkID ) { - if( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() ) +// RKV if( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() ) + if( myVTK2ObjIds.empty() || theVtkID >= (int)myVTK2ObjIds.size() ) // RKV return -1; #if defined __GNUC_2__ return myVTK2ObjIds[theVtkID]; -- 2.39.2