]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
abort when using SMESH GUI for creating a mesh from a geometry (while testing suitabl... SHAPER_V9_1_0RC1
authorPaul RASCLE <paul.rascle@edf.fr>
Wed, 29 Aug 2018 14:40:12 +0000 (16:40 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Wed, 29 Aug 2018 14:40:12 +0000 (16:40 +0200)
src/SMESH/SMESH_subMesh.cxx

index 5b5de318b6a1d46e29ff7f5990f9e62222989fef..57d0d338df5cd790b315ef4e456dcedae0a77b18 100644 (file)
@@ -2595,8 +2595,11 @@ const std::vector< SMESH_subMesh * > & SMESH_subMesh::GetAncestors() const
     TopTools_MapOfShape map;
 
     // assure that all sub-meshes exist
-    _father->GetSubMesh( _father->GetShapeToMesh() )->DependsOn();
-
+    TopoDS_Shape mainShape = _father->GetShapeToMesh();
+    if (!mainShape.IsNull())
+      {
+        _father->GetSubMesh( _father->GetShapeToMesh() )->DependsOn();
+      }
     for ( TopTools_ListIteratorOfListOfShape it( ancShapes ); it.More(); it.Next() )
       if ( SMESH_subMesh* sm = _father->GetSubMeshContaining( it.Value() ))
         if ( map.Add( it.Value() ))