]> 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:57:48 +0000 (06:57 +0000)
committerrnv <rnv@opencascade.com>
Fri, 3 Oct 2008 06:57:48 +0000 (06:57 +0000)
src/OBJECT/SMESH_DeviceActor.cxx

index 257fcd9f8b08d35b8cced1196d6a4b226088ec3d..cf7971f91130a31625afbba45acb7e230a9b07ec 100644 (file)
@@ -721,7 +721,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;
 }
@@ -757,7 +757,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;