From e33cb6cc033a04b4c4373a3cfb9a62eb2c121845 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 31 Jul 2020 20:23:28 +0300 Subject: [PATCH] #19765 - fix regression --- src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx index 2ae8c8c09..06aa3ec1a 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.cxx @@ -272,11 +272,9 @@ int SALOMEDSImpl_UseCaseBuilder::GetIndexInFather(const SALOMEDSImpl_SObject& th if ( index < 0 ) { SALOMEDSImpl_AttributeTreeNode* Last = aFather->GetFirst(); - for ( index = 0; Last && Last->HasNext(); ++index ) + for ( index = 0; Last && aNode != Last && Last->HasNext(); ++index ) { Last = Last->GetNext(); - if ( aNode == Last ) - break; } if ( Last != aNode ) index = -1; -- 2.39.2