From: eap Date: Wed, 8 Aug 2012 09:33:35 +0000 (+0000) Subject: 0021776: [CEA 610] SetEnforcedMeshWithGroup fails or succeeds depending in how we... X-Git-Tag: V6_6_0a1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=401a0096ebbccad679748da63af7aaba26f21782;p=plugins%2Fhybridplugin.git 0021776: [CEA 610] SetEnforcedMeshWithGroup fails or succeeds depending in how we use it static void addElemInMeshGroup(SMESH_Mesh* theMesh, const SMDS_MeshElement* anElem, std::string& groupName, std::set& groupsToRemove) { + if ( !anElem ) return; // issue 0021776 --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 6da9eec..76d36b1 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -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 groupsToRemove) +static void addElemInMeshGroup(SMESH_Mesh* theMesh, + const SMDS_MeshElement* anElem, + std::string& groupName, + std::set& groupsToRemove) { + if ( !anElem ) return; // issue 0021776 + bool groupDone = false; SMESH_Mesh::GroupIteratorPtr grIt = theMesh->GetGroups(); while (grIt->more()) {