]> 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:05:33 +0000 (11:05 +0000)
committereap <eap@opencascade.com>
Fri, 27 Feb 2009 11:05:33 +0000 (11:05 +0000)
   fix GetInputId(): prevent from out_of_range error if theOutId==myOut2InId.size()

src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx

index 7cd46041a9c2e26a334a3397709c06dd3394fcb7..1efd06cdb940e44b7ac44f854b4cd351cf9e6b29 100755 (executable)
@@ -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{