0020871: EDF 1411 SMESH: Distribution with analytical density crashes Salome

* avoid passing infinite value to qwt
This commit is contained in:
eap 2010-05-12 08:05:52 +00:00
parent d719b27fc2
commit c985e18383

View File

@ -50,6 +50,7 @@
#ifdef WIN32
# include <algorithm>
#endif
#include <math.h>
#include <Basics_Utils.hxx>
@ -262,6 +263,10 @@ void StdMeshersGUI_DistrPreview::update()
showError();
return;
}
if ( isinf(y[i]))
y[i] = std::numeric_limits<double>::max()/100.;
// if ( y[i] > 1e3 )
// y[i] = 1e3;
if( i==0 || y[i]<min_y )
min_y = y[i];
if( i==0 || y[i]>max_y )