Salome HOME
52459: Viscous layers are not normal to the surface.
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index a355866d08bcd3da95f7b7e1a4a3c400822a3271..dcdf7fe3f81ecb4cba3b7eff76455e3e5347230b 100644 (file)
@@ -984,6 +984,8 @@ SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape)
   throw(SALOME_Exception)
 {
   int index = _myMeshDS->ShapeToIndex(aSubShape);
+  if ( !index && aSubShape.IsNull() )
+    return 0;
 
   // for submeshes on GEOM Group
   if (( !index || index > _nbSubShapes ) && aSubShape.ShapeType() == TopAbs_COMPOUND ) {