From e33d871d3ff9d9d5781a91186642e18b36ba8427 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 4 May 2006 09:17:43 +0000 Subject: [PATCH] "ConvertFromQuadratic": allow rmoving free elems/nodes being not in submesh --- src/SMESHDS/SMESHDS_Mesh.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } -- 2.39.2