From bf7367a22ff05398ea748108979b6c314c444e8b Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 17 Feb 2014 17:08:46 +0400 Subject: [PATCH] fix AddFrom() for an undefined filter as argument --- src/SMESH_I/SMESH_Group_i.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SMESH_I/SMESH_Group_i.cxx b/src/SMESH_I/SMESH_Group_i.cxx index 76dae4673..1b7dbd5ea 100644 --- a/src/SMESH_I/SMESH_Group_i.cxx +++ b/src/SMESH_I/SMESH_Group_i.cxx @@ -411,9 +411,9 @@ CORBA::Long SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource ) long prevNb = Size(); SMESHDS_Group* aGroupDS = dynamic_cast( GetGroupDS() ); if (aGroupDS) { - SMDS_ElemIteratorPtr elemIt = SMESH_Mesh_i::GetElements( theSource, GetType() ); - while ( elemIt->more() ) - aGroupDS->SMDSGroup().Add( elemIt->next() ); + if ( SMDS_ElemIteratorPtr elemIt = SMESH_Mesh_i::GetElements( theSource, GetType() )) + while ( elemIt->more() ) + aGroupDS->SMDSGroup().Add( elemIt->next() ); } // Update Python script -- 2.39.2