]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Regression of SALOME_TESTS/Grids/smesh/imps_09/K5
authoreap <eap@opencascade.com>
Fri, 15 Nov 2013 17:54:28 +0000 (17:54 +0000)
committereap <eap@opencascade.com>
Fri, 15 Nov 2013 17:54:28 +0000 (17:54 +0000)
Take care to remove a node from its sub-mesh

src/SMESHDS/SMESHDS_Mesh.cxx

index 8489868cc5f0e33750e1608d4389b8543124aba9..3e52032790648a5c845ec08f8e0466894d2cbe8a 100644 (file)
@@ -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);
 }