From 401a0096ebbccad679748da63af7aaba26f21782 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 8 Aug 2012 09:33:35 +0000 Subject: [PATCH] 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 --- src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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()) { -- 2.39.2