From: vsr Date: Tue, 18 May 2010 11:56:05 +0000 (+0000) Subject: 0020871: EDF 1411 SMESH: Distribution with analytical density crashes Salome X-Git-Tag: V5_1_4~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d30d8ec9ffd0228e6519a32b1c3f44688a8722d;p=modules%2Fsmesh.git 0020871: EDF 1411 SMESH: Distribution with analytical density crashes Salome Additional patch for Windows from Erwan ADAM --- diff --git a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx index a723fdbef..fb4937417 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx @@ -264,8 +264,13 @@ void StdMeshersGUI_DistrPreview::update() showError(); return; } +#ifdef WIN32 + if ( std::fabs(y[i]) >= HUGE_VAL) + y[i] = HUGE_VAL/100.; +#else if ( isinf(y[i])) y[i] = std::numeric_limits::max()/100.; +#endif // if ( y[i] > 1e3 ) // y[i] = 1e3; if( i==0 || y[i]