From 0e70fe931bcdc96739d603031c15f8a82faafd06 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 10 Mar 2010 13:21:56 +0000 Subject: [PATCH] fix FindFace() after the previous integration --- src/SMDS/SMDS_Mesh.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } } } -- 2.39.2