From: vsr Date: Fri, 14 Oct 2011 15:09:47 +0000 (+0000) Subject: 0019957: EDF 785 SMESH: Convert Quadratic and Group on GEOM X-Git-Tag: V6_4_0a1~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=26bfcad40a336722644bfb9643fc490d5ef711d9;p=modules%2Fsmesh.git 0019957: EDF 785 SMESH: Convert Quadratic and Group on GEOM Avoid endless recursing in FindCoincidentNodes() function (causing crash) --- diff --git a/src/SMESHUtils/SMESH_OctreeNode.cxx b/src/SMESHUtils/SMESH_OctreeNode.cxx index f735011e6..ddaac892b 100644 --- a/src/SMESHUtils/SMESH_OctreeNode.cxx +++ b/src/SMESHUtils/SMESH_OctreeNode.cxx @@ -249,7 +249,9 @@ void SMESH_OctreeNode::FindCoincidentNodes (TIDSortedNodeSet& theSetOfNodes, const int maxLevel, const int maxNbNodes) { - SMESH_OctreeNode theOctreeNode(theSetOfNodes, maxLevel, maxNbNodes, theTolerance); + // VSR 14/10/2011: limit max number of the levels in order to avoid endless recursing + const int MAX_LEVEL = 10; + SMESH_OctreeNode theOctreeNode(theSetOfNodes, maxLevel < 0 ? MAX_LEVEL : maxLevel, maxNbNodes, theTolerance); theOctreeNode.FindCoincidentNodes (&theSetOfNodes, theTolerance, theGroupsOfNodes); }