From: eap Date: Thu, 13 Feb 2020 10:37:31 +0000 (+0300) Subject: Prevent crash at too small comment ratio of geometric progression hypothesis X-Git-Tag: V9_5_0a1~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bda71f4197e589fab8b784abb636a993ff6aa808;p=modules%2Fsmesh.git Prevent crash at too small comment ratio of geometric progression hypothesis --- diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index 12619c94f..45e1c25b6 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -974,6 +974,8 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh, an = eltSize; eltSize *= q; ++nbParams; + if ( q < 1. && eltSize < 1e-100 ) + return error("Too small common ratio causes too many segments"); } if ( nbParams > 1 ) {