From 890ce9fde2b20bce7100085707035b210b08811c Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 9 Jan 2019 14:37:31 +0300 Subject: [PATCH] 54499: SALOME crash at mesh evaluation --- src/StdMeshers/StdMeshers_Quadrangle_2D.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index 19461a774..c59949550 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -965,8 +965,7 @@ bool StdMeshers_Quadrangle_2D::Evaluate(SMESH_Mesh& aMesh, //int nbFaces4 = (nbhoriz-1-kdh)*(nbvertic-1-kdv); int nbFaces4 = (nbhoriz-1)*(nbvertic-1); - std::vector aVec(SMDSEntity_Last); - for (int i=SMDSEntity_Node; i aVec(SMDSEntity_Last,0); if (IsQuadratic) { aVec[SMDSEntity_Quad_Triangle] = nbFaces3; aVec[SMDSEntity_Quad_Quadrangle] = nbFaces4; @@ -1718,6 +1717,8 @@ bool StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(SMESH_Mesh& aMes } } list::iterator ite = sideEdges.begin(); + if ( nbSides >= (int)aNbNodes.size() ) + return false; aNbNodes[nbSides] = 1; for (; ite!=sideEdges.end(); ite++) { SMESH_subMesh * sm = aMesh.GetSubMesh(*ite); -- 2.39.2