]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix fo IPAL20415 (Error on mouse picking with Shift in 3D viewer if any dialog box...
authorrnv <rnv@opencascade.com>
Fri, 3 Oct 2008 06:56:33 +0000 (06:56 +0000)
committerrnv <rnv@opencascade.com>
Fri, 3 Oct 2008 06:56:33 +0000 (06:56 +0000)
src/OBJECT/SMESH_DeviceActor.cxx

index c885fb9321fc904a41a4ae8608f9d7df7c0b2902..5de5e8db7691e115ccb8fecc453df144e6d6fdb9 100644 (file)
@@ -655,7 +655,7 @@ SMESH_DeviceActor
 {
   vtkDataSet* aDataSet = myMergeFilter->GetOutput();
   vtkIdType anID = myVisualObj->GetNodeVTKId(theObjID);
-  vtkFloatingPointType* aCoord = aDataSet->GetPoint(anID);
+  vtkFloatingPointType* aCoord = (anID >= 0) ? aDataSet->GetPoint(anID) : NULL;
   if(MYDEBUG) MESSAGE("GetNodeCoord - theObjID = "<<theObjID<<"; anID = "<<anID);
   return aCoord;
 }
@@ -691,7 +691,7 @@ SMESH_DeviceActor
 {
   vtkDataSet* aDataSet = myVisualObj->GetUnstructuredGrid();
   vtkIdType aGridID = myVisualObj->GetElemVTKId(theObjID);
-  vtkCell* aCell = aDataSet->GetCell(aGridID);
+  vtkCell* aCell = (aGridID >= 0) ? aDataSet->GetCell(aGridID) : NULL;
   if(MYDEBUG) 
     MESSAGE("GetElemCell - theObjID = "<<theObjID<<"; aGridID = "<<aGridID);
   return aCell;