]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0020183: EDF SMESH 966 : Mesh element info anomaly
authoreap <eap@opencascade.com>
Fri, 27 Feb 2009 11:09:02 +0000 (11:09 +0000)
committereap <eap@opencascade.com>
Fri, 27 Feb 2009 11:09:02 +0000 (11:09 +0000)
   fix GetElemObjId(): prevent from out_of_range error if theVtkID==myVTK2ObjIds.size()

src/VTKViewer/VTKViewer_GeometryFilter.cxx

index c9f40a734dd00ac6d5490479762214f21dc7d7a6..aa3055f2b80e07bce28a4e613586e73707e76c74 100755 (executable)
@@ -23,7 +23,6 @@
 //  File   : VTKViewer_GeometryFilter.cxx
 //  Author : Michael ZORIN
 //  Module : SALOME
-//  $Header$ 
 //
 #include "VTKViewer_GeometryFilter.h"
 #include "VTKViewer_ConvexTool.h"
@@ -994,11 +993,7 @@ VTKViewer_GeometryFilter
 
 vtkIdType VTKViewer_GeometryFilter::GetElemObjId( int theVtkID )
 {
-  if( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() )
+  if( theVtkID < 0 || theVtkID >= (int)myVTK2ObjIds.size() )
     return -1;
-#if defined __GNUC_2__
   return myVTK2ObjIds[theVtkID];
-#else
-  return myVTK2ObjIds.at(theVtkID);
-#endif
 }