From: eap Date: Mon, 17 Feb 2014 13:08:46 +0000 (+0400) Subject: fix AddFrom() for an undefined filter as argument X-Git-Tag: V7_4_0a1~69 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf7367a22ff05398ea748108979b6c314c444e8b;p=modules%2Fsmesh.git fix AddFrom() for an undefined filter as argument --- 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