]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Do not replace the tree if it exists and is empty
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Apr 2007 09:45:33 +0000 (09:45 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Apr 2007 09:45:33 +0000 (09:45 +0000)
STEER/TTreeStream.cxx

index 445f1fb5825bec547d2dafa2470deded8a23f338..2287454cc2d547bb73d2acd071c97f16970298bd 100644 (file)
@@ -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);