From bbc15444a89241e987dc23362f0cf3bc84f5cdc7 Mon Sep 17 00:00:00 2001 From: hristov Date: Wed, 18 Apr 2007 09:45:33 +0000 Subject: [PATCH] Do not replace the tree if it exists and is empty --- STEER/TTreeStream.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/STEER/TTreeStream.cxx b/STEER/TTreeStream.cxx index 445f1fb5825..2287454cc2d 100644 --- a/STEER/TTreeStream.cxx +++ b/STEER/TTreeStream.cxx @@ -400,8 +400,8 @@ void TTreeStream::BuildTree(){ // // Build the Tree // - if (fTree->GetEntries()>0) return; - fTree = new TTree(GetName(),GetName()); + if (fTree && fTree->GetEntries()>0) return; + if (!fTree) fTree = new TTree(GetName(),GetName()); Int_t entries = fElements->GetEntriesFast(); fBranches = new TObjArray(entries); -- 2.43.5