From: gdd Date: Fri, 23 Mar 2012 10:38:09 +0000 (+0000) Subject: EDF 2182: Salome crashes when Physical size is set to 0 X-Git-Tag: V6_5_0a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7aa17b8a652d366a3a787644a9aa933d79104a3c;p=plugins%2Fblsurfplugin.git EDF 2182: Salome crashes when Physical size is set to 0 --- diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index ca260ab..4cd31dc 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -185,7 +185,12 @@ void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) { //============================================================================= void BLSURFPlugin_Hypothesis::SetPhySize(double theVal) { if (theVal != _phySize) { - _phySize = theVal; + if (theVal == 0) { + _phySize = GetPhyMax(); + MESSAGE("Warning: nul physical size is not allowed"); + } + else + _phySize = theVal; NotifySubMeshesHypothesisModification(); } }