]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
"ConvertFromQuadratic": allow rmoving free elems/nodes being not in submesh
authoreap <eap@opencascade.com>
Thu, 4 May 2006 09:17:43 +0000 (09:17 +0000)
committereap <eap@opencascade.com>
Thu, 4 May 2006 09:17:43 +0000 (09:17 +0000)
src/SMESHDS/SMESHDS_Mesh.cxx

index 60b756ed2262299e92dae61874c298df44fdd964..6fab4c837e60032d7db8d8c99a02c9d9bc66be2a 100644 (file)
@@ -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);
 }