Skip to content
Snippets Groups Projects
Commit 3fa24667 authored by Gerardo Ganis's avatar Gerardo Ganis
Browse files

Make sure that iterators are always correctly defined

git-svn-id: http://root.cern.ch/svn/root/trunk@40776 27541ba8-7e3a-0410-8455-c3a389f83636
parent ea7f4ea2
No related branches found
No related tags found
No related merge requests found
......@@ -188,11 +188,10 @@ Int_t TProofNodes::ActivateWorkers(const char *workers)
Int_t nworkersnode = sworkers.Atoi();
Int_t ret = nworkersnode;
TSlaveInfo *si = 0;
TIter nxtnode(fNodes);
TList *node = 0;
TIter nxk(fNodes);
TObject *key = 0;
TIter nxk(fNodes);
while ((key = nxk()) != 0) {
if ((node = dynamic_cast<TList *>(fNodes->GetValue(key)))) {
TIter nxtworker(node);
......@@ -239,8 +238,9 @@ Int_t TProofNodes::ActivateWorkers(const char *workers)
// Rebuild
Build();
nxk.Reset();
while ((key = nxk()) != 0) {
// Build() destroyes fNodes so we need to re-create the iterator, resetting is not enough ...
TIter nxkn(fNodes);
while ((key = nxkn()) != 0) {
if ((node = dynamic_cast<TList *>(fNodes->GetValue(key)))) {
TIter nxtworker(node);
Int_t nactiveworkers = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment