From 7aa17b8a652d366a3a787644a9aa933d79104a3c Mon Sep 17 00:00:00 2001 From: gdd Date: Fri, 23 Mar 2012 10:38:09 +0000 Subject: [PATCH] EDF 2182: Salome crashes when Physical size is set to 0 --- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); } } -- 2.39.2