]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
0021776: [CEA 610] SetEnforcedMeshWithGroup fails or succeeds depending in how we...
authoreap <eap@opencascade.com>
Wed, 8 Aug 2012 09:33:35 +0000 (09:33 +0000)
committereap <eap@opencascade.com>
Wed, 8 Aug 2012 09:33:35 +0000 (09:33 +0000)
static void addElemInMeshGroup(SMESH_Mesh*             theMesh,
                               const SMDS_MeshElement* anElem,
                               std::string&            groupName,
                               std::set<std::string>&  groupsToRemove)
{
+  if ( !anElem ) return; // issue 0021776

src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx

index 6da9eec38bb19cd651e6931cf2c492e38177b143..76d36b12568169c1aed56f30464c80405a03d1ad 100644 (file)
@@ -1001,11 +1001,13 @@ static int findShapeID(SMESH_Mesh&          mesh,
 //purpose  : Update or create groups in mesh
 //=======================================================================
 
-static void addElemInMeshGroup(SMESH_Mesh* theMesh,
-                             const SMDS_MeshElement* anElem,
-                             std::string groupName,
-                             std::set<std::string> groupsToRemove)
+static void addElemInMeshGroup(SMESH_Mesh*             theMesh,
+                               const SMDS_MeshElement* anElem,
+                               std::string&            groupName,
+                               std::set<std::string>&  groupsToRemove)
 {
+  if ( !anElem ) return; // issue 0021776
+
   bool groupDone = false;
   SMESH_Mesh::GroupIteratorPtr grIt = theMesh->GetGroups();
   while (grIt->more()) {