From: eap Date: Fri, 31 Jul 2020 17:23:28 +0000 (+0300) Subject: #19765 - fix regression X-Git-Tag: V9_6_0a1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e33cb6cc033a04b4c4373a3cfb9a62eb2c121845;p=modules%2Fkernel.git #19765 - fix regression --- 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;