]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Minor changes
authorapo <apo@opencascade.com>
Mon, 17 Oct 2005 07:07:59 +0000 (07:07 +0000)
committerapo <apo@opencascade.com>
Mon, 17 Oct 2005 07:07:59 +0000 (07:07 +0000)
src/OBJECT/VISU_GaussPtsAct.cxx

index ab61fee02802abe145bfba7645378bdc85317ee1..5b3370dcd75fcbfd65e144ea758e32b55f4076be 100644 (file)
@@ -459,15 +459,11 @@ VISU_GaussPtsAct
 //----------------------------------------------------------------------------
 bool VISU_GaussPtsAct::IsInfinitive()
 {
-  vtkMapper *pMapper =GetMapper();
-  vtkDataSet* pDS=pMapper->GetInput();
-  pDS->Update();
-  int aNb=pDS->GetNumberOfCells();
-  if (aNb<2) {
-    myIsInfinite=true;
+  if(vtkMapper* aMapper = GetMapper()){
+    if(vtkDataSet* aDataSet= aMapper->GetInput()){
+      aDataSet->Update();
+      myIsInfinite = aDataSet->GetNumberOfCells() < 2;
     }
-  else{
-    myIsInfinite=false;
   }
   return myIsInfinite;
 }