From: eap Date: Thu, 4 May 2006 09:17:43 +0000 (+0000) Subject: "ConvertFromQuadratic": allow rmoving free elems/nodes being not in submesh X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e33d871d3ff9d9d5781a91186642e18b36ba8427;p=modules%2Fsmesh.git "ConvertFromQuadratic": allow rmoving free elems/nodes being not in submesh --- diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index 60b756ed2..6fab4c837 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -713,7 +713,8 @@ void SMESHDS_Mesh::RemoveFreeNode(const SMDS_MeshNode * n, SMESHDS_SubMesh * sub // Rm from sub-mesh // Node should belong to only one sub-mesh - subMesh->RemoveNode(n); + if( subMesh ) + subMesh->RemoveNode(n); SMDS_Mesh::RemoveFreeElement(n); } @@ -770,7 +771,8 @@ void SMESHDS_Mesh::RemoveFreeElement(const SMDS_MeshElement * elt, SMESHDS_SubMe // Rm from sub-mesh // Element should belong to only one sub-mesh - subMesh->RemoveElement(elt); + if( subMesh ) + subMesh->RemoveElement(elt); SMDS_Mesh::RemoveFreeElement(elt); }