]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Minor fix (to avoid SIGFPE during picking of Gauss Points presentation with null...
authorouv <ouv@opencascade.com>
Thu, 13 May 2010 08:16:24 +0000 (08:16 +0000)
committerouv <ouv@opencascade.com>
Thu, 13 May 2010 08:16:24 +0000 (08:16 +0000)
src/PIPELINE/VISU_GaussPointsPL.cxx

index 43887c4fcf0ab362a5d96380871d925ed807b284..06c33ffc3db9f0311fe08501a166dd753e3ee9d8 100644 (file)
@@ -678,6 +678,10 @@ VISU_GaussPointsPL
   vtkFloatingPointType* aScalarRange = GetScalarRange();
   vtkFloatingPointType aDeltaScalarRange = aScalarRange[1] - aScalarRange[0];
 
+  // to avoid FPE if the minimum is equal to maximum
+  if( aDeltaScalarRange < 1.0 / VTK_LARGE_FLOAT )
+    return aMinSize;
+
   return aMinSize + aDelta*(aVal - aScalarRange[0]) / aDeltaScalarRange;
 }