From: ouv Date: Thu, 13 May 2010 08:16:24 +0000 (+0000) Subject: Minor fix (to avoid SIGFPE during picking of Gauss Points presentation with null... X-Git-Tag: V5_1_4~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8eb3ece317b546887394c0aa55a45d3668a71d84;p=modules%2Fvisu.git Minor fix (to avoid SIGFPE during picking of Gauss Points presentation with null length scalar range) --- diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index 43887c4f..06c33ffc 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -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; }