fix FindFace() after the previous integration

This commit is contained in:
eap 2010-03-10 13:21:56 +00:00
parent f4bf7b006c
commit 0e70fe931b

View File

@ -1782,10 +1782,11 @@ const SMDS_MeshFace* SMDS_Mesh::FindFace (const std::vector<const SMDS_MeshNode
while (itF->more()) { while (itF->more()) {
const SMDS_MeshElement* f = itF->next(); const SMDS_MeshElement* f = itF->next();
if ( f->NbNodes() == nodes.size() ) { if ( f->NbNodes() == nodes.size() ) {
for ( int i = 1; i < nodes.size(); ++ i ) for ( int i = 1; f && i < nodes.size(); ++ i )
if ( f->GetNodeIndex( nodes[ i ]) < 0 ) if ( f->GetNodeIndex( nodes[ i ]) < 0 )
return NULL; f = 0;
return static_cast<const SMDS_MeshFace *> (f); if ( f )
return static_cast<const SMDS_MeshFace *> (f);
} }
} }
} }