From b099b4c7c3ffd108fa8129c750477e514d7a679d Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 15 Nov 2013 17:54:28 +0000 Subject: [PATCH] Regression of SALOME_TESTS/Grids/smesh/imps_09/K5 Take care to remove a node from its sub-mesh --- src/SMESHDS/SMESHDS_Mesh.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index 8489868cc..3e5203279 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -895,8 +895,9 @@ void SMESHDS_Mesh::RemoveFreeNode(const SMDS_MeshNode * n, // Rm from sub-mesh // Node should belong to only one sub-mesh - if( subMesh ) - subMesh->RemoveNode(n,/*deleted=*/false); + if ( !subMesh || !subMesh->RemoveNode(n,/*deleted=*/false)) + if (( subMesh = MeshElements( n->getshapeId() ))) + subMesh->RemoveNode(n,/*deleted=*/false ); SMDS_Mesh::RemoveFreeElement(n); } -- 2.39.2