diff --git a/tree/tree/src/TTree.cxx b/tree/tree/src/TTree.cxx index 2f1855927ff85b1200823aa3230f9345b2d4975f..5e400fcbcdd0fc4b63998f474e40949b671bda3e 100644 --- a/tree/tree/src/TTree.cxx +++ b/tree/tree/src/TTree.cxx @@ -2745,7 +2745,12 @@ TTree* TTree::CloneTree(Long64_t nentries /* = -1 */, Option_t* option /* = "" * // Add the new tree to the list of clones so that // we can later inform it of changes to branch addresses. thistree->AddClone(newtree); - + if (thistree != this) { + // In case this object is a TChain, add the clone + // also to the TChain's list of clones. + AddClone(newtree); + } + newtree->Reset(); TDirectory* ndir = newtree->GetDirectory();