From: ageay Date: Thu, 26 May 2005 10:37:06 +0000 (+0000) Subject: Correction of a bug : X-Git-Tag: T2_2_4a~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3df7dd5911045b5351f9e838fbfc9f2c0f081bc5;p=modules%2Fkernel.git Correction of a bug : When a component does not exist in a machine, list of machine was not updated correctly. --- diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index da3c89977..2a67ffc7b 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -319,14 +319,14 @@ void SALOME_ResourcesManager::SelectOnlyResourcesWithOS(vector& hosts,co //Warning need an updated parsed list : _resourcesList void SALOME_ResourcesManager::KeepOnlyResourcesWithModule(vector& hosts,const char *moduleName) const throw(SALOME_Exception) { - for(vector::iterator iter=hosts.begin();iter!=hosts.end();iter++) + for(vector::iterator iter=hosts.begin();iter!=hosts.end();) { MapOfParserResourcesType::const_iterator it=_resourcesList.find(*iter); const map& mapOfModulesOfCurrentHost=(((*it).second).ModulesPath); if(mapOfModulesOfCurrentHost.find(moduleName)==mapOfModulesOfCurrentHost.end()) - { - hosts.erase(iter); - } + hosts.erase(iter); + else + iter++; } }