fix AddFrom() for an undefined filter as argument

This commit is contained in:
eap 2014-02-17 17:08:46 +04:00
parent 85f64d17e5
commit bf7367a22f

View File

@ -411,9 +411,9 @@ CORBA::Long SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
long prevNb = Size();
SMESHDS_Group* aGroupDS = dynamic_cast<SMESHDS_Group*>( 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