From: eap Date: Wed, 10 Mar 2010 13:21:56 +0000 (+0000) Subject: fix FindFace() after the previous integration X-Git-Tag: V5_1_4a1~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0e70fe931bcdc96739d603031c15f8a82faafd06;p=modules%2Fsmesh.git fix FindFace() after the previous integration --- diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index a50532de6..d6235a3b7 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -1782,10 +1782,11 @@ const SMDS_MeshFace* SMDS_Mesh::FindFace (const std::vectormore()) { const SMDS_MeshElement* f = itF->next(); 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 ) - return NULL; - return static_cast (f); + f = 0; + if ( f ) + return static_cast (f); } } }